Peter Hanspers | 8d95e3b | 2018-05-15 10:22:36 +0200 | [diff] [blame] | 1 | /* |
| 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" |
| 14 | #include "rtc_base/refcountedobject.h" |
| 15 | |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame^] | 16 | #include "sdk/objc/native/src/audio/audio_device_module_ios.h" |
Peter Hanspers | 8d95e3b | 2018-05-15 10:22:36 +0200 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModule() { |
| 21 | RTC_LOG(INFO) << __FUNCTION__; |
| 22 | #if defined(WEBRTC_IOS) |
| 23 | return new rtc::RefCountedObject<ios_adm::AudioDeviceModuleIOS>(); |
| 24 | #else |
| 25 | RTC_LOG(LERROR) |
| 26 | << "current platform is not supported => this module will self destruct!"; |
| 27 | return nullptr; |
| 28 | #endif |
| 29 | } |
| 30 | } |