1 /*
2 * Copyright (c) 2013 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 "webrtc/modules/audio_device/dummy/audio_device_dummy.h"
12
13 namespace webrtc {
14
ActiveAudioLayer(AudioDeviceModule::AudioLayer & audioLayer) const15 int32_t AudioDeviceDummy::ActiveAudioLayer(
16 AudioDeviceModule::AudioLayer& audioLayer) const {
17 return -1;
18 }
19
Init()20 int32_t AudioDeviceDummy::Init() { return 0; }
21
Terminate()22 int32_t AudioDeviceDummy::Terminate() { return 0; }
23
Initialized() const24 bool AudioDeviceDummy::Initialized() const { return true; }
25
PlayoutDevices()26 int16_t AudioDeviceDummy::PlayoutDevices() { return -1; }
27
RecordingDevices()28 int16_t AudioDeviceDummy::RecordingDevices() { return -1; }
29
PlayoutDeviceName(uint16_t index,char name[kAdmMaxDeviceNameSize],char guid[kAdmMaxGuidSize])30 int32_t AudioDeviceDummy::PlayoutDeviceName(uint16_t index,
31 char name[kAdmMaxDeviceNameSize],
32 char guid[kAdmMaxGuidSize]) {
33 return -1;
34 }
35
RecordingDeviceName(uint16_t index,char name[kAdmMaxDeviceNameSize],char guid[kAdmMaxGuidSize])36 int32_t AudioDeviceDummy::RecordingDeviceName(uint16_t index,
37 char name[kAdmMaxDeviceNameSize],
38 char guid[kAdmMaxGuidSize]) {
39 return -1;
40 }
41
SetPlayoutDevice(uint16_t index)42 int32_t AudioDeviceDummy::SetPlayoutDevice(uint16_t index) { return -1; }
43
SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device)44 int32_t AudioDeviceDummy::SetPlayoutDevice(
45 AudioDeviceModule::WindowsDeviceType device) {
46 return -1;
47 }
48
SetRecordingDevice(uint16_t index)49 int32_t AudioDeviceDummy::SetRecordingDevice(uint16_t index) { return -1; }
50
SetRecordingDevice(AudioDeviceModule::WindowsDeviceType device)51 int32_t AudioDeviceDummy::SetRecordingDevice(
52 AudioDeviceModule::WindowsDeviceType device) {
53 return -1;
54 }
55
PlayoutIsAvailable(bool & available)56 int32_t AudioDeviceDummy::PlayoutIsAvailable(bool& available) { return -1; }
57
InitPlayout()58 int32_t AudioDeviceDummy::InitPlayout() { return -1; }
59
PlayoutIsInitialized() const60 bool AudioDeviceDummy::PlayoutIsInitialized() const { return false; }
61
RecordingIsAvailable(bool & available)62 int32_t AudioDeviceDummy::RecordingIsAvailable(bool& available) { return -1; }
63
InitRecording()64 int32_t AudioDeviceDummy::InitRecording() { return -1; }
65
RecordingIsInitialized() const66 bool AudioDeviceDummy::RecordingIsInitialized() const { return false; }
67
StartPlayout()68 int32_t AudioDeviceDummy::StartPlayout() { return -1; }
69
StopPlayout()70 int32_t AudioDeviceDummy::StopPlayout() { return -1; }
71
Playing() const72 bool AudioDeviceDummy::Playing() const { return false; }
73
StartRecording()74 int32_t AudioDeviceDummy::StartRecording() { return -1; }
75
StopRecording()76 int32_t AudioDeviceDummy::StopRecording() { return -1; }
77
Recording() const78 bool AudioDeviceDummy::Recording() const { return false; }
79
SetAGC(bool enable)80 int32_t AudioDeviceDummy::SetAGC(bool enable) { return -1; }
81
AGC() const82 bool AudioDeviceDummy::AGC() const { return false; }
83
SetWaveOutVolume(uint16_t volumeLeft,uint16_t volumeRight)84 int32_t AudioDeviceDummy::SetWaveOutVolume(uint16_t volumeLeft,
85 uint16_t volumeRight) {
86 return -1;
87 }
88
WaveOutVolume(uint16_t & volumeLeft,uint16_t & volumeRight) const89 int32_t AudioDeviceDummy::WaveOutVolume(uint16_t& volumeLeft,
90 uint16_t& volumeRight) const {
91 return -1;
92 }
93
InitSpeaker()94 int32_t AudioDeviceDummy::InitSpeaker() { return -1; }
95
SpeakerIsInitialized() const96 bool AudioDeviceDummy::SpeakerIsInitialized() const { return false; }
97
InitMicrophone()98 int32_t AudioDeviceDummy::InitMicrophone() { return -1; }
99
MicrophoneIsInitialized() const100 bool AudioDeviceDummy::MicrophoneIsInitialized() const { return false; }
101
SpeakerVolumeIsAvailable(bool & available)102 int32_t AudioDeviceDummy::SpeakerVolumeIsAvailable(bool& available) {
103 return -1;
104 }
105
SetSpeakerVolume(uint32_t volume)106 int32_t AudioDeviceDummy::SetSpeakerVolume(uint32_t volume) { return -1; }
107
SpeakerVolume(uint32_t & volume) const108 int32_t AudioDeviceDummy::SpeakerVolume(uint32_t& volume) const { return -1; }
109
MaxSpeakerVolume(uint32_t & maxVolume) const110 int32_t AudioDeviceDummy::MaxSpeakerVolume(uint32_t& maxVolume) const {
111 return -1;
112 }
113
MinSpeakerVolume(uint32_t & minVolume) const114 int32_t AudioDeviceDummy::MinSpeakerVolume(uint32_t& minVolume) const {
115 return -1;
116 }
117
SpeakerVolumeStepSize(uint16_t & stepSize) const118 int32_t AudioDeviceDummy::SpeakerVolumeStepSize(uint16_t& stepSize) const {
119 return -1;
120 }
121
MicrophoneVolumeIsAvailable(bool & available)122 int32_t AudioDeviceDummy::MicrophoneVolumeIsAvailable(bool& available) {
123 return -1;
124 }
125
SetMicrophoneVolume(uint32_t volume)126 int32_t AudioDeviceDummy::SetMicrophoneVolume(uint32_t volume) { return -1; }
127
MicrophoneVolume(uint32_t & volume) const128 int32_t AudioDeviceDummy::MicrophoneVolume(uint32_t& volume) const {
129 return -1;
130 }
131
MaxMicrophoneVolume(uint32_t & maxVolume) const132 int32_t AudioDeviceDummy::MaxMicrophoneVolume(uint32_t& maxVolume) const {
133 return -1;
134 }
135
MinMicrophoneVolume(uint32_t & minVolume) const136 int32_t AudioDeviceDummy::MinMicrophoneVolume(uint32_t& minVolume) const {
137 return -1;
138 }
139
MicrophoneVolumeStepSize(uint16_t & stepSize) const140 int32_t AudioDeviceDummy::MicrophoneVolumeStepSize(uint16_t& stepSize) const {
141 return -1;
142 }
143
SpeakerMuteIsAvailable(bool & available)144 int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& available) { return -1; }
145
SetSpeakerMute(bool enable)146 int32_t AudioDeviceDummy::SetSpeakerMute(bool enable) { return -1; }
147
SpeakerMute(bool & enabled) const148 int32_t AudioDeviceDummy::SpeakerMute(bool& enabled) const { return -1; }
149
MicrophoneMuteIsAvailable(bool & available)150 int32_t AudioDeviceDummy::MicrophoneMuteIsAvailable(bool& available) {
151 return -1;
152 }
153
SetMicrophoneMute(bool enable)154 int32_t AudioDeviceDummy::SetMicrophoneMute(bool enable) { return -1; }
155
MicrophoneMute(bool & enabled) const156 int32_t AudioDeviceDummy::MicrophoneMute(bool& enabled) const { return -1; }
157
MicrophoneBoostIsAvailable(bool & available)158 int32_t AudioDeviceDummy::MicrophoneBoostIsAvailable(bool& available) {
159 return -1;
160 }
161
SetMicrophoneBoost(bool enable)162 int32_t AudioDeviceDummy::SetMicrophoneBoost(bool enable) { return -1; }
163
MicrophoneBoost(bool & enabled) const164 int32_t AudioDeviceDummy::MicrophoneBoost(bool& enabled) const { return -1; }
165
StereoPlayoutIsAvailable(bool & available)166 int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& available) {
167 return -1;
168 }
SetStereoPlayout(bool enable)169 int32_t AudioDeviceDummy::SetStereoPlayout(bool enable) { return -1; }
170
StereoPlayout(bool & enabled) const171 int32_t AudioDeviceDummy::StereoPlayout(bool& enabled) const { return -1; }
172
StereoRecordingIsAvailable(bool & available)173 int32_t AudioDeviceDummy::StereoRecordingIsAvailable(bool& available) {
174 return -1;
175 }
176
SetStereoRecording(bool enable)177 int32_t AudioDeviceDummy::SetStereoRecording(bool enable) { return -1; }
178
StereoRecording(bool & enabled) const179 int32_t AudioDeviceDummy::StereoRecording(bool& enabled) const { return -1; }
180
SetPlayoutBuffer(const AudioDeviceModule::BufferType type,uint16_t sizeMS)181 int32_t AudioDeviceDummy::SetPlayoutBuffer(
182 const AudioDeviceModule::BufferType type,
183 uint16_t sizeMS) {
184 return -1;
185 }
186
PlayoutBuffer(AudioDeviceModule::BufferType & type,uint16_t & sizeMS) const187 int32_t AudioDeviceDummy::PlayoutBuffer(AudioDeviceModule::BufferType& type,
188 uint16_t& sizeMS) const {
189 return -1;
190 }
191
PlayoutDelay(uint16_t & delayMS) const192 int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& delayMS) const { return -1; }
193
RecordingDelay(uint16_t & delayMS) const194 int32_t AudioDeviceDummy::RecordingDelay(uint16_t& delayMS) const { return -1; }
195
CPULoad(uint16_t & load) const196 int32_t AudioDeviceDummy::CPULoad(uint16_t& load) const { return -1; }
197
PlayoutWarning() const198 bool AudioDeviceDummy::PlayoutWarning() const { return false; }
199
PlayoutError() const200 bool AudioDeviceDummy::PlayoutError() const { return false; }
201
RecordingWarning() const202 bool AudioDeviceDummy::RecordingWarning() const { return false; }
203
RecordingError() const204 bool AudioDeviceDummy::RecordingError() const { return false; }
205
ClearPlayoutWarning()206 void AudioDeviceDummy::ClearPlayoutWarning() {}
207
ClearPlayoutError()208 void AudioDeviceDummy::ClearPlayoutError() {}
209
ClearRecordingWarning()210 void AudioDeviceDummy::ClearRecordingWarning() {}
211
ClearRecordingError()212 void AudioDeviceDummy::ClearRecordingError() {}
213
AttachAudioBuffer(AudioDeviceBuffer * audioBuffer)214 void AudioDeviceDummy::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {}
215 } // namespace webrtc
216