niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 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 | |
pbos@webrtc.org | 811269d | 2013-07-11 13:24:38 +0000 | [diff] [blame] | 11 | #include "webrtc/modules/audio_device/audio_device_generic.h" |
| 12 | #include "webrtc/system_wrappers/interface/trace.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
| 14 | namespace webrtc { |
| 15 | |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 16 | int32_t AudioDeviceGeneric::SetRecordingSampleRate( |
| 17 | const uint32_t samplesPerSec) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | { |
| 19 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 20 | "Set recording sample rate not supported on this platform"); |
| 21 | return -1; |
| 22 | } |
| 23 | |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 24 | int32_t AudioDeviceGeneric::SetPlayoutSampleRate( |
| 25 | const uint32_t samplesPerSec) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | { |
| 27 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 28 | "Set playout sample rate not supported on this platform"); |
| 29 | return -1; |
| 30 | } |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 31 | |
| 32 | int32_t AudioDeviceGeneric::SetLoudspeakerStatus(bool enable) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | { |
| 34 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 35 | "Set loudspeaker status not supported on this platform"); |
| 36 | return -1; |
| 37 | } |
| 38 | |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 39 | int32_t AudioDeviceGeneric::GetLoudspeakerStatus(bool& enable) const |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 40 | { |
| 41 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 42 | "Get loudspeaker status not supported on this platform"); |
| 43 | return -1; |
| 44 | } |
| 45 | |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 46 | int32_t AudioDeviceGeneric::ResetAudioDevice() |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 47 | { |
| 48 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 49 | "Reset audio device not supported on this platform"); |
| 50 | return -1; |
| 51 | } |
| 52 | |
pbos@webrtc.org | 2550988 | 2013-04-09 10:30:35 +0000 | [diff] [blame] | 53 | int32_t AudioDeviceGeneric::SoundDeviceControl(unsigned int par1, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | unsigned int par2, unsigned int par3, unsigned int par4) |
| 55 | { |
| 56 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 57 | "Sound device control not supported on this platform"); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | return -1; |
| 59 | } |
| 60 | |
henrika@webrtc.org | a954c07 | 2014-12-09 16:22:09 +0000 | [diff] [blame] | 61 | bool AudioDeviceGeneric::BuiltInAECIsAvailable() const { |
| 62 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 63 | "Built-in AEC not supported on this platform"); |
| 64 | return false; |
| 65 | } |
| 66 | |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 67 | int32_t AudioDeviceGeneric::EnableBuiltInAEC(bool enable) |
| 68 | { |
| 69 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
henrika@webrtc.org | a954c07 | 2014-12-09 16:22:09 +0000 | [diff] [blame] | 70 | "Built-in AEC not supported on this platform"); |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 71 | return -1; |
| 72 | } |
| 73 | |
| 74 | bool AudioDeviceGeneric::BuiltInAECIsEnabled() const |
| 75 | { |
| 76 | WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, |
| 77 | "Windows AEC not supported on this platform"); |
| 78 | return false; |
| 79 | } |
| 80 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 81 | } // namespace webrtc |