summaryrefslogtreecommitdiffstats
path: root/content/test/webrtc_audio_device_test.cc
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:55:23 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 20:55:23 +0000
commitcfb09c2d58ecb16b14192619695ea54570344ca7 (patch)
tree4d55c178533d474429eef44382fdc93c9fa0e28f /content/test/webrtc_audio_device_test.cc
parentef12d1e6acb871dbd01f330d0b10ada24d209371 (diff)
downloadchromium_src-cfb09c2d58ecb16b14192619695ea54570344ca7.zip
chromium_src-cfb09c2d58ecb16b14192619695ea54570344ca7.tar.gz
chromium_src-cfb09c2d58ecb16b14192619695ea54570344ca7.tar.bz2
Make AudioParameters a class instead of a struct
Also collapses some long parameter lists into AudioParameters and moves some of the hardcoded values (e.g. 16 bit audio in AudioDevice) to more appropriate locations. BUG=115902 TEST=manually testing everything works out Review URL: https://chromiumcodereview.appspot.com/9655018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/webrtc_audio_device_test.cc')
-rw-r--r--content/test/webrtc_audio_device_test.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/content/test/webrtc_audio_device_test.cc b/content/test/webrtc_audio_device_test.cc
index b132617..d13f79ca 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -212,24 +212,25 @@ void WebRTCAudioDeviceTest::DestroyChannel() {
audio_input_renderer_host_ = NULL;
}
-void WebRTCAudioDeviceTest::OnGetHardwareSampleRate(double* sample_rate) {
+void WebRTCAudioDeviceTest::OnGetHardwareSampleRate(int* sample_rate) {
EXPECT_TRUE(audio_util_callback_);
*sample_rate = audio_util_callback_ ?
- audio_util_callback_->GetAudioHardwareSampleRate() : 0.0;
+ audio_util_callback_->GetAudioHardwareSampleRate() : 0;
}
-void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(double* sample_rate) {
+void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(int* sample_rate) {
EXPECT_TRUE(audio_util_callback_);
*sample_rate = audio_util_callback_ ?
audio_util_callback_->GetAudioInputHardwareSampleRate(
- AudioManagerBase::kDefaultDeviceId) : 0.0;
+ AudioManagerBase::kDefaultDeviceId) : 0;
}
-void WebRTCAudioDeviceTest::OnGetHardwareInputChannelCount(uint32* channels) {
+void WebRTCAudioDeviceTest::OnGetHardwareInputChannelLayout(
+ ChannelLayout* layout) {
EXPECT_TRUE(audio_util_callback_);
- *channels = audio_util_callback_ ?
- audio_util_callback_->GetAudioInputHardwareChannelCount(
- AudioManagerBase::kDefaultDeviceId) : 0;
+ *layout = audio_util_callback_ ?
+ audio_util_callback_->GetAudioInputHardwareChannelLayout(
+ AudioManagerBase::kDefaultDeviceId) : CHANNEL_LAYOUT_NONE;
}
// IPC::Channel::Listener implementation.
@@ -264,8 +265,8 @@ bool WebRTCAudioDeviceTest::OnMessageReceived(const IPC::Message& message) {
OnGetHardwareSampleRate)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetHardwareInputSampleRate,
OnGetHardwareInputSampleRate)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GetHardwareInputChannelCount,
- OnGetHardwareInputChannelCount)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetHardwareInputChannelLayout,
+ OnGetHardwareInputChannelLayout)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()