| Index: content/renderer/media/webrtc_audio_device_unittest.cc
|
| diff --git a/content/renderer/media/webrtc_audio_device_unittest.cc b/content/renderer/media/webrtc_audio_device_unittest.cc
|
| index 30157b0c0b7235644b10b9e3a46bb5c648e2b0fc..8b82748a8552799d23a66feac394a1b1dfa7318f 100644
|
| --- a/content/renderer/media/webrtc_audio_device_unittest.cc
|
| +++ b/content/renderer/media/webrtc_audio_device_unittest.cc
|
| @@ -45,6 +45,9 @@ class AudioUtil : public AudioUtilInterface {
|
| const std::string& device_id) OVERRIDE {
|
| return media::GetAudioInputHardwareChannelLayout(device_id);
|
| }
|
| + virtual int GetAudioOutputBufferSize() OVERRIDE {
|
| + return media::GetAudioHardwareBufferSize();
|
| + }
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(AudioUtil);
|
| };
|
| @@ -69,6 +72,9 @@ class AudioUtilNoHardware : public AudioUtilInterface {
|
| const std::string& device_id) OVERRIDE {
|
| return input_channel_layout_;
|
| }
|
| + virtual int GetAudioOutputBufferSize() OVERRIDE {
|
| + return (output_rate_ / 100);
|
| + }
|
|
|
| private:
|
| int output_rate_;
|
| @@ -78,7 +84,7 @@ class AudioUtilNoHardware : public AudioUtilInterface {
|
| };
|
|
|
| // Return true if at least one element in the array matches |value|.
|
| -bool FindElementInArray(int* array, int size, int value) {
|
| +bool FindElementInArray(const int* array, int size, int value) {
|
| return (std::find(&array[0], &array[0] + size, value) != &array[size]);
|
| }
|
|
|
| @@ -92,8 +98,8 @@ bool HardwareSampleRatesAreValid() {
|
| // These are the currently supported hardware sample rates in both directions.
|
| // The actual WebRTC client can limit these ranges further depending on
|
| // platform but this is the maximum range we support today.
|
| - int valid_input_rates[] = {16000, 32000, 44100, 48000, 96000};
|
| - int valid_output_rates[] = {44100, 48000, 96000};
|
| + const int valid_input_rates[] = {16000, 32000, 44100, 48000, 96000};
|
| + const int valid_output_rates[] = {16000, 32000, 44100, 48000, 96000};
|
|
|
| // Verify the input sample rate.
|
| int input_sample_rate = GetAudioInputSampleRate();
|
| @@ -477,7 +483,7 @@ TEST_F(WebRTCAudioDeviceTest, DISABLED_PlayLocalFile) {
|
| // Play 2 seconds worth of audio and then quit.
|
| message_loop_.PostDelayedTask(FROM_HERE,
|
| MessageLoop::QuitClosure(),
|
| - base::TimeDelta::FromSeconds(2));
|
| + base::TimeDelta::FromSeconds(10));
|
| message_loop_.Run();
|
|
|
| renderer->Stop();
|
| @@ -555,7 +561,7 @@ TEST_F(WebRTCAudioDeviceTest, FullDuplexAudioWithAGC) {
|
| LOG(INFO) << ">> You should now be able to hear yourself in loopback...";
|
| message_loop_.PostDelayedTask(FROM_HERE,
|
| MessageLoop::QuitClosure(),
|
| - base::TimeDelta::FromSeconds(2));
|
| + base::TimeDelta::FromSeconds(10));
|
| message_loop_.Run();
|
|
|
| renderer->Stop();
|
|
|