@@ -72,15 +72,17 @@ namespace webrtc {
7272
7373rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create (
7474 AudioLayer audio_layer,
75- TaskQueueFactory* task_queue_factory) {
75+ TaskQueueFactory* task_queue_factory,
76+ bool bypass_voice_processing) {
7677 RTC_DLOG (LS_INFO) << __FUNCTION__;
77- return AudioDeviceModule::CreateForTest (audio_layer, task_queue_factory);
78+ return AudioDeviceModule::CreateForTest (audio_layer, task_queue_factory, bypass_voice_processing );
7879}
7980
8081// static
8182rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest (
8283 AudioLayer audio_layer,
83- TaskQueueFactory* task_queue_factory) {
84+ TaskQueueFactory* task_queue_factory,
85+ bool bypass_voice_processing) {
8486 RTC_DLOG (LS_INFO) << __FUNCTION__;
8587
8688 // The "AudioDeviceModule::kWindowsCoreAudio2" audio layer has its own
@@ -93,7 +95,7 @@ rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
9395
9496 // Create the generic reference counted (platform independent) implementation.
9597 auto audio_device = rtc::make_ref_counted<AudioDeviceModuleImpl>(
96- audio_layer, task_queue_factory);
98+ audio_layer, task_queue_factory, bypass_voice_processing );
9799
98100 // Ensure that the current platform is supported.
99101 if (audio_device->CheckPlatform () == -1 ) {
@@ -116,8 +118,13 @@ rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
116118
117119AudioDeviceModuleImpl::AudioDeviceModuleImpl (
118120 AudioLayer audio_layer,
119- TaskQueueFactory* task_queue_factory)
120- : audio_layer_(audio_layer), audio_device_buffer_(task_queue_factory) {
121+ TaskQueueFactory* task_queue_factory,
122+ bool bypass_voice_processing)
123+ : audio_layer_(audio_layer),
124+ #if defined(WEBRTC_IOS)
125+ bypass_voice_processing_ (bypass_voice_processing),
126+ #endif
127+ audio_device_buffer_ (task_queue_factory) {
121128 RTC_DLOG (LS_INFO) << __FUNCTION__;
122129}
123130
@@ -280,7 +287,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
280287#if defined(WEBRTC_IOS)
281288 if (audio_layer == kPlatformDefaultAudio ) {
282289 audio_device_.reset (
283- new ios_adm::AudioDeviceIOS (/* bypass_voice_processing=*/ false ));
290+ new ios_adm::AudioDeviceIOS (/* bypass_voice_processing=*/ bypass_voice_processing_ ));
284291 RTC_LOG (LS_INFO) << " iPhone Audio APIs will be utilized." ;
285292 }
286293// END #if defined(WEBRTC_IOS)
@@ -937,6 +944,13 @@ int AudioDeviceModuleImpl::GetRecordAudioParameters(
937944}
938945#endif // WEBRTC_IOS
939946
947+ int32_t AudioDeviceModuleImpl::SetAudioDeviceSink (AudioDeviceSink* sink) const {
948+ RTC_LOG (LS_INFO) << __FUNCTION__ << " (" << sink << " )" ;
949+ int32_t ok = audio_device_->SetAudioDeviceSink (sink);
950+ RTC_LOG (LS_INFO) << " output: " << ok;
951+ return ok;
952+ }
953+
940954AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform () const {
941955 RTC_LOG (LS_INFO) << __FUNCTION__;
942956 return platform_type_;
0 commit comments