@@ -72,15 +72,17 @@ namespace webrtc {
72
72
73
73
rtc::scoped_refptr<AudioDeviceModule> AudioDeviceModule::Create (
74
74
AudioLayer audio_layer,
75
- TaskQueueFactory* task_queue_factory) {
75
+ TaskQueueFactory* task_queue_factory,
76
+ bool bypass_voice_processing) {
76
77
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 );
78
79
}
79
80
80
81
// static
81
82
rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest (
82
83
AudioLayer audio_layer,
83
- TaskQueueFactory* task_queue_factory) {
84
+ TaskQueueFactory* task_queue_factory,
85
+ bool bypass_voice_processing) {
84
86
RTC_DLOG (LS_INFO) << __FUNCTION__;
85
87
86
88
// The "AudioDeviceModule::kWindowsCoreAudio2" audio layer has its own
@@ -93,7 +95,7 @@ rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
93
95
94
96
// Create the generic reference counted (platform independent) implementation.
95
97
auto audio_device = rtc::make_ref_counted<AudioDeviceModuleImpl>(
96
- audio_layer, task_queue_factory);
98
+ audio_layer, task_queue_factory, bypass_voice_processing );
97
99
98
100
// Ensure that the current platform is supported.
99
101
if (audio_device->CheckPlatform () == -1 ) {
@@ -116,8 +118,13 @@ rtc::scoped_refptr<AudioDeviceModuleForTest> AudioDeviceModule::CreateForTest(
116
118
117
119
AudioDeviceModuleImpl::AudioDeviceModuleImpl (
118
120
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) {
121
128
RTC_DLOG (LS_INFO) << __FUNCTION__;
122
129
}
123
130
@@ -280,7 +287,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
280
287
#if defined(WEBRTC_IOS)
281
288
if (audio_layer == kPlatformDefaultAudio ) {
282
289
audio_device_.reset (
283
- new ios_adm::AudioDeviceIOS (/* bypass_voice_processing=*/ false ));
290
+ new ios_adm::AudioDeviceIOS (/* bypass_voice_processing=*/ bypass_voice_processing_ ));
284
291
RTC_LOG (LS_INFO) << " iPhone Audio APIs will be utilized." ;
285
292
}
286
293
// END #if defined(WEBRTC_IOS)
@@ -937,6 +944,13 @@ int AudioDeviceModuleImpl::GetRecordAudioParameters(
937
944
}
938
945
#endif // WEBRTC_IOS
939
946
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
+
940
954
AudioDeviceModuleImpl::PlatformType AudioDeviceModuleImpl::Platform () const {
941
955
RTC_LOG (LS_INFO) << __FUNCTION__;
942
956
return platform_type_;
0 commit comments