xref: /aosp_15_r20/external/webrtc/modules/audio_device/dummy/audio_device_dummy.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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 "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 AudioDeviceGeneric::InitStatus AudioDeviceDummy::Init() {
21   return InitStatus::OK;
22 }
23 
Terminate()24 int32_t AudioDeviceDummy::Terminate() {
25   return 0;
26 }
27 
Initialized() const28 bool AudioDeviceDummy::Initialized() const {
29   return true;
30 }
31 
PlayoutDevices()32 int16_t AudioDeviceDummy::PlayoutDevices() {
33   return -1;
34 }
35 
RecordingDevices()36 int16_t AudioDeviceDummy::RecordingDevices() {
37   return -1;
38 }
39 
PlayoutDeviceName(uint16_t index,char name[kAdmMaxDeviceNameSize],char guid[kAdmMaxGuidSize])40 int32_t AudioDeviceDummy::PlayoutDeviceName(uint16_t index,
41                                             char name[kAdmMaxDeviceNameSize],
42                                             char guid[kAdmMaxGuidSize]) {
43   return -1;
44 }
45 
RecordingDeviceName(uint16_t index,char name[kAdmMaxDeviceNameSize],char guid[kAdmMaxGuidSize])46 int32_t AudioDeviceDummy::RecordingDeviceName(uint16_t index,
47                                               char name[kAdmMaxDeviceNameSize],
48                                               char guid[kAdmMaxGuidSize]) {
49   return -1;
50 }
51 
SetPlayoutDevice(uint16_t index)52 int32_t AudioDeviceDummy::SetPlayoutDevice(uint16_t index) {
53   return -1;
54 }
55 
SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType device)56 int32_t AudioDeviceDummy::SetPlayoutDevice(
57     AudioDeviceModule::WindowsDeviceType device) {
58   return -1;
59 }
60 
SetRecordingDevice(uint16_t index)61 int32_t AudioDeviceDummy::SetRecordingDevice(uint16_t index) {
62   return -1;
63 }
64 
SetRecordingDevice(AudioDeviceModule::WindowsDeviceType device)65 int32_t AudioDeviceDummy::SetRecordingDevice(
66     AudioDeviceModule::WindowsDeviceType device) {
67   return -1;
68 }
69 
PlayoutIsAvailable(bool & available)70 int32_t AudioDeviceDummy::PlayoutIsAvailable(bool& available) {
71   return -1;
72 }
73 
InitPlayout()74 int32_t AudioDeviceDummy::InitPlayout() {
75   return -1;
76 }
77 
PlayoutIsInitialized() const78 bool AudioDeviceDummy::PlayoutIsInitialized() const {
79   return false;
80 }
81 
RecordingIsAvailable(bool & available)82 int32_t AudioDeviceDummy::RecordingIsAvailable(bool& available) {
83   return -1;
84 }
85 
InitRecording()86 int32_t AudioDeviceDummy::InitRecording() {
87   return -1;
88 }
89 
RecordingIsInitialized() const90 bool AudioDeviceDummy::RecordingIsInitialized() const {
91   return false;
92 }
93 
StartPlayout()94 int32_t AudioDeviceDummy::StartPlayout() {
95   return -1;
96 }
97 
StopPlayout()98 int32_t AudioDeviceDummy::StopPlayout() {
99   return 0;
100 }
101 
Playing() const102 bool AudioDeviceDummy::Playing() const {
103   return false;
104 }
105 
StartRecording()106 int32_t AudioDeviceDummy::StartRecording() {
107   return -1;
108 }
109 
StopRecording()110 int32_t AudioDeviceDummy::StopRecording() {
111   return 0;
112 }
113 
Recording() const114 bool AudioDeviceDummy::Recording() const {
115   return false;
116 }
117 
InitSpeaker()118 int32_t AudioDeviceDummy::InitSpeaker() {
119   return -1;
120 }
121 
SpeakerIsInitialized() const122 bool AudioDeviceDummy::SpeakerIsInitialized() const {
123   return false;
124 }
125 
InitMicrophone()126 int32_t AudioDeviceDummy::InitMicrophone() {
127   return -1;
128 }
129 
MicrophoneIsInitialized() const130 bool AudioDeviceDummy::MicrophoneIsInitialized() const {
131   return false;
132 }
133 
SpeakerVolumeIsAvailable(bool & available)134 int32_t AudioDeviceDummy::SpeakerVolumeIsAvailable(bool& available) {
135   return -1;
136 }
137 
SetSpeakerVolume(uint32_t volume)138 int32_t AudioDeviceDummy::SetSpeakerVolume(uint32_t volume) {
139   return -1;
140 }
141 
SpeakerVolume(uint32_t & volume) const142 int32_t AudioDeviceDummy::SpeakerVolume(uint32_t& volume) const {
143   return -1;
144 }
145 
MaxSpeakerVolume(uint32_t & maxVolume) const146 int32_t AudioDeviceDummy::MaxSpeakerVolume(uint32_t& maxVolume) const {
147   return -1;
148 }
149 
MinSpeakerVolume(uint32_t & minVolume) const150 int32_t AudioDeviceDummy::MinSpeakerVolume(uint32_t& minVolume) const {
151   return -1;
152 }
153 
MicrophoneVolumeIsAvailable(bool & available)154 int32_t AudioDeviceDummy::MicrophoneVolumeIsAvailable(bool& available) {
155   return -1;
156 }
157 
SetMicrophoneVolume(uint32_t volume)158 int32_t AudioDeviceDummy::SetMicrophoneVolume(uint32_t volume) {
159   return -1;
160 }
161 
MicrophoneVolume(uint32_t & volume) const162 int32_t AudioDeviceDummy::MicrophoneVolume(uint32_t& volume) const {
163   return -1;
164 }
165 
MaxMicrophoneVolume(uint32_t & maxVolume) const166 int32_t AudioDeviceDummy::MaxMicrophoneVolume(uint32_t& maxVolume) const {
167   return -1;
168 }
169 
MinMicrophoneVolume(uint32_t & minVolume) const170 int32_t AudioDeviceDummy::MinMicrophoneVolume(uint32_t& minVolume) const {
171   return -1;
172 }
173 
SpeakerMuteIsAvailable(bool & available)174 int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& available) {
175   return -1;
176 }
177 
SetSpeakerMute(bool enable)178 int32_t AudioDeviceDummy::SetSpeakerMute(bool enable) {
179   return -1;
180 }
181 
SpeakerMute(bool & enabled) const182 int32_t AudioDeviceDummy::SpeakerMute(bool& enabled) const {
183   return -1;
184 }
185 
MicrophoneMuteIsAvailable(bool & available)186 int32_t AudioDeviceDummy::MicrophoneMuteIsAvailable(bool& available) {
187   return -1;
188 }
189 
SetMicrophoneMute(bool enable)190 int32_t AudioDeviceDummy::SetMicrophoneMute(bool enable) {
191   return -1;
192 }
193 
MicrophoneMute(bool & enabled) const194 int32_t AudioDeviceDummy::MicrophoneMute(bool& enabled) const {
195   return -1;
196 }
197 
StereoPlayoutIsAvailable(bool & available)198 int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& available) {
199   return -1;
200 }
SetStereoPlayout(bool enable)201 int32_t AudioDeviceDummy::SetStereoPlayout(bool enable) {
202   return -1;
203 }
204 
StereoPlayout(bool & enabled) const205 int32_t AudioDeviceDummy::StereoPlayout(bool& enabled) const {
206   return -1;
207 }
208 
StereoRecordingIsAvailable(bool & available)209 int32_t AudioDeviceDummy::StereoRecordingIsAvailable(bool& available) {
210   return -1;
211 }
212 
SetStereoRecording(bool enable)213 int32_t AudioDeviceDummy::SetStereoRecording(bool enable) {
214   return -1;
215 }
216 
StereoRecording(bool & enabled) const217 int32_t AudioDeviceDummy::StereoRecording(bool& enabled) const {
218   return -1;
219 }
220 
PlayoutDelay(uint16_t & delayMS) const221 int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& delayMS) const {
222   return -1;
223 }
224 
AttachAudioBuffer(AudioDeviceBuffer * audioBuffer)225 void AudioDeviceDummy::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {}
226 }  // namespace webrtc
227