summaryrefslogtreecommitdiffstats
path: root/content/renderer/media
diff options
context:
space:
mode:
authorhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 06:49:50 +0000
committerhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 06:49:50 +0000
commitd8b874bf0be545c52e002965bf93f32cdfbf2f81 (patch)
tree535bfe8aa7cf9b539793192bfe700a4f51c29dd5 /content/renderer/media
parent2c6b126ea6db62f696f8642c5de1b9f6d106d970 (diff)
downloadchromium_src-d8b874bf0be545c52e002965bf93f32cdfbf2f81.zip
chromium_src-d8b874bf0be545c52e002965bf93f32cdfbf2f81.tar.gz
chromium_src-d8b874bf0be545c52e002965bf93f32cdfbf2f81.tar.bz2
Resolves crash related to conflict with latest WebRTC (1008) and the WebRTCAudioDeviceTest unit test.
This patch ensure that the ADM in Chrome reports the correct channel setting (stero/mono) to the using webrtc::VoiceEngine. BUG=none TEST=content_unittests --gtest_filter=WebRTCAudioDeviceTest* Review URL: http://codereview.chromium.org/8707001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111676 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media')
-rw-r--r--content/renderer/media/webrtc_audio_device_impl.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index 6e1e218..2d5bd36 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -828,9 +828,8 @@ int32_t WebRtcAudioDeviceImpl::MicrophoneBoost(bool* enabled) const {
}
int32_t WebRtcAudioDeviceImpl::StereoPlayoutIsAvailable(bool* available) const {
- DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoPlayoutIsAvailable() "
- << "NOT IMPLEMENTED";
- *available = false;
+ DCHECK(initialized_) << "Init() must be called first.";
+ *available = (output_channels_ == 2);
return 0;
}
@@ -848,8 +847,8 @@ int32_t WebRtcAudioDeviceImpl::StereoPlayout(bool* enabled) const {
int32_t WebRtcAudioDeviceImpl::StereoRecordingIsAvailable(
bool* available) const {
- DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoRecordingIsAvailable() "
- << "NOT IMPLEMENTED";
+ DCHECK(initialized_) << "Init() must be called first.";
+ *available = (input_channels_ == 2);
return 0;
}