Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: content/renderer/media/webrtc_audio_device_unittest.cc

Issue 12049070: Avoids irregular OnMoreData callbacks on Windows using Core Audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleaned up Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b8f066e8de3761a24b9ec9d16254edfedd85de39 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_;
@@ -93,7 +99,7 @@ bool HardwareSampleRatesAreValid() {
// 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};
tommi (sloooow) - chröme 2013/01/31 13:42:08 nit: make these const
henrika (OOO until Aug 14) 2013/01/31 14:29:38 Done.
- int valid_output_rates[] = {44100, 48000, 96000};
+ 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();
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_renderer.h » ('j') | content/renderer/media/webrtc_audio_renderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698