OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/audio_device/audio_device_generic.h" | 11 #include "webrtc/modules/audio_device/audio_device_generic.h" |
12 #include "webrtc/system_wrappers/interface/trace.h" | 12 #include "webrtc/base/logging.h" |
13 | 13 |
14 namespace webrtc { | 14 namespace webrtc { |
15 | 15 |
16 int32_t AudioDeviceGeneric::SetRecordingSampleRate( | 16 int32_t AudioDeviceGeneric::SetRecordingSampleRate( |
17 const uint32_t samplesPerSec) | 17 const uint32_t samplesPerSec) { |
18 { | 18 LOG_F(LS_ERROR) << "Not supported on this platform"; |
19 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 19 return -1; |
20 "Set recording sample rate not supported on this platform"); | |
21 return -1; | |
22 } | 20 } |
23 | 21 |
24 int32_t AudioDeviceGeneric::SetPlayoutSampleRate( | 22 int32_t AudioDeviceGeneric::SetPlayoutSampleRate(const uint32_t samplesPerSec) { |
25 const uint32_t samplesPerSec) | 23 LOG_F(LS_ERROR) << "Not supported on this platform"; |
26 { | 24 return -1; |
27 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | |
28 "Set playout sample rate not supported on this platform"); | |
29 return -1; | |
30 } | 25 } |
31 | 26 |
32 int32_t AudioDeviceGeneric::SetLoudspeakerStatus(bool enable) | 27 int32_t AudioDeviceGeneric::SetLoudspeakerStatus(bool enable) { |
33 { | 28 LOG_F(LS_ERROR) << "Not supported on this platform"; |
34 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 29 return -1; |
35 "Set loudspeaker status not supported on this platform"); | |
36 return -1; | |
37 } | 30 } |
38 | 31 |
39 int32_t AudioDeviceGeneric::GetLoudspeakerStatus(bool& enable) const | 32 int32_t AudioDeviceGeneric::GetLoudspeakerStatus(bool& enable) const { |
40 { | 33 LOG_F(LS_ERROR) << "Not supported on this platform"; |
41 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 34 return -1; |
42 "Get loudspeaker status not supported on this platform"); | |
43 return -1; | |
44 } | 35 } |
45 | 36 |
46 int32_t AudioDeviceGeneric::ResetAudioDevice() | 37 int32_t AudioDeviceGeneric::ResetAudioDevice() { |
47 { | 38 LOG_F(LS_ERROR) << "Not supported on this platform"; |
48 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 39 return -1; |
49 "Reset audio device not supported on this platform"); | |
50 return -1; | |
51 } | 40 } |
52 | 41 |
53 int32_t AudioDeviceGeneric::SoundDeviceControl(unsigned int par1, | 42 int32_t AudioDeviceGeneric::SoundDeviceControl(unsigned int par1, |
54 unsigned int par2, unsigned int par3, unsigned int par4) | 43 unsigned int par2, |
55 { | 44 unsigned int par3, |
56 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 45 unsigned int par4) { |
57 "Sound device control not supported on this platform"); | 46 LOG_F(LS_ERROR) << "Not supported on this platform"; |
58 return -1; | 47 return -1; |
59 } | 48 } |
60 | 49 |
61 bool AudioDeviceGeneric::BuiltInAECIsAvailable() const { | 50 bool AudioDeviceGeneric::BuiltInAECIsAvailable() const { |
62 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 51 LOG_F(LS_ERROR) << "Not supported on this platform"; |
63 "Built-in AEC not supported on this platform"); | |
64 return false; | 52 return false; |
65 } | 53 } |
66 | 54 |
67 int32_t AudioDeviceGeneric::EnableBuiltInAEC(bool enable) | 55 int32_t AudioDeviceGeneric::EnableBuiltInAEC(bool enable) { |
68 { | 56 LOG_F(LS_ERROR) << "Not supported on this platform"; |
69 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 57 return -1; |
70 "Built-in AEC not supported on this platform"); | |
71 return -1; | |
72 } | 58 } |
73 | 59 |
74 bool AudioDeviceGeneric::BuiltInAECIsEnabled() const | 60 bool AudioDeviceGeneric::BuiltInAECIsEnabled() const { |
75 { | 61 LOG_F(LS_ERROR) << "Not supported on this platform"; |
76 WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, | 62 return false; |
77 "Windows AEC not supported on this platform"); | 63 } |
78 return false; | 64 |
| 65 int AudioDeviceGeneric::GetPlayoutAudioParameters( |
| 66 AudioParameters* params) const { |
| 67 LOG_F(LS_ERROR) << "Not supported on this platform"; |
| 68 return -1; |
| 69 } |
| 70 int AudioDeviceGeneric::GetRecordAudioParameters( |
| 71 AudioParameters* params) const { |
| 72 LOG_F(LS_ERROR) << "Not supported on this platform"; |
| 73 return -1; |
79 } | 74 } |
80 | 75 |
81 } // namespace webrtc | 76 } // namespace webrtc |
OLD | NEW |