blob: dd9577520470e9faa55df2df8738be3cd1a05b29 [file] [log] [blame]
Peter Hanspers8d95e3b2018-05-15 10:22:36 +02001/*
2 * Copyright 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "audio_device_module.h"
12
13#include "rtc_base/logging.h"
Steve Anton10542f22019-01-11 09:11:00 -080014#include "rtc_base/ref_counted_object.h"
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020015
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020016#include "sdk/objc/native/src/audio/audio_device_module_ios.h"
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020017
18namespace webrtc {
19
Sam Zackrisson76443ea2020-11-26 12:18:11 +010020rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModule(bool bypass_voice_processing) {
Mirko Bonadei3b68aa32021-01-28 09:21:06 +010021 RTC_DLOG(INFO) << __FUNCTION__;
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020022#if defined(WEBRTC_IOS)
Sam Zackrisson76443ea2020-11-26 12:18:11 +010023 return new rtc::RefCountedObject<ios_adm::AudioDeviceModuleIOS>(bypass_voice_processing);
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020024#else
25 RTC_LOG(LERROR)
26 << "current platform is not supported => this module will self destruct!";
27 return nullptr;
28#endif
29}
30}