OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/webrtc_audio_device_impl.h" | 5 #include "content/renderer/media/webrtc_audio_device_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "content/renderer/media/audio_hardware.h" | 10 #include "content/renderer/media/audio_hardware.h" |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 NOTIMPLEMENTED(); | 821 NOTIMPLEMENTED(); |
822 return -1; | 822 return -1; |
823 } | 823 } |
824 | 824 |
825 int32_t WebRtcAudioDeviceImpl::MicrophoneBoost(bool* enabled) const { | 825 int32_t WebRtcAudioDeviceImpl::MicrophoneBoost(bool* enabled) const { |
826 NOTIMPLEMENTED(); | 826 NOTIMPLEMENTED(); |
827 return -1; | 827 return -1; |
828 } | 828 } |
829 | 829 |
830 int32_t WebRtcAudioDeviceImpl::StereoPlayoutIsAvailable(bool* available) const { | 830 int32_t WebRtcAudioDeviceImpl::StereoPlayoutIsAvailable(bool* available) const { |
831 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoPlayoutIsAvailable() " | 831 DCHECK(initialized_) << "Init() must be called first."; |
832 << "NOT IMPLEMENTED"; | 832 *available = (output_channels_ == 2); |
833 *available = false; | |
834 return 0; | 833 return 0; |
835 } | 834 } |
836 | 835 |
837 int32_t WebRtcAudioDeviceImpl::SetStereoPlayout(bool enable) { | 836 int32_t WebRtcAudioDeviceImpl::SetStereoPlayout(bool enable) { |
838 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::SetStereoPlayout() " | 837 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::SetStereoPlayout() " |
839 << "NOT IMPLEMENTED"; | 838 << "NOT IMPLEMENTED"; |
840 return 0; | 839 return 0; |
841 } | 840 } |
842 | 841 |
843 int32_t WebRtcAudioDeviceImpl::StereoPlayout(bool* enabled) const { | 842 int32_t WebRtcAudioDeviceImpl::StereoPlayout(bool* enabled) const { |
844 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoPlayout() " | 843 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoPlayout() " |
845 << "NOT IMPLEMENTED"; | 844 << "NOT IMPLEMENTED"; |
846 return 0; | 845 return 0; |
847 } | 846 } |
848 | 847 |
849 int32_t WebRtcAudioDeviceImpl::StereoRecordingIsAvailable( | 848 int32_t WebRtcAudioDeviceImpl::StereoRecordingIsAvailable( |
850 bool* available) const { | 849 bool* available) const { |
851 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::StereoRecordingIsAvailable() " | 850 DCHECK(initialized_) << "Init() must be called first."; |
852 << "NOT IMPLEMENTED"; | 851 *available = (input_channels_ == 2); |
853 return 0; | 852 return 0; |
854 } | 853 } |
855 | 854 |
856 int32_t WebRtcAudioDeviceImpl::SetStereoRecording(bool enable) { | 855 int32_t WebRtcAudioDeviceImpl::SetStereoRecording(bool enable) { |
857 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::SetStereoRecording() " | 856 DVLOG(2) << "WARNING: WebRtcAudioDeviceImpl::SetStereoRecording() " |
858 << "NOT IMPLEMENTED"; | 857 << "NOT IMPLEMENTED"; |
859 return -1; | 858 return -1; |
860 } | 859 } |
861 | 860 |
862 int32_t WebRtcAudioDeviceImpl::StereoRecording(bool* enabled) const { | 861 int32_t WebRtcAudioDeviceImpl::StereoRecording(bool* enabled) const { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 } | 964 } |
966 | 965 |
967 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { | 966 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { |
968 NOTIMPLEMENTED(); | 967 NOTIMPLEMENTED(); |
969 return -1; | 968 return -1; |
970 } | 969 } |
971 | 970 |
972 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { | 971 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { |
973 session_id_ = session_id; | 972 session_id_ = session_id; |
974 } | 973 } |
OLD | NEW |