Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: webrtc/webrtc/modules/audio_device/include/fake_audio_device.h @ 0:4bda6873e34c

pub_scrub_3792 tip
Last change on this file since 0:4bda6873e34c was 0:4bda6873e34c, checked in by Michael Prittie <mprittie@…>, 6 years ago

Scrubbed password for publication.

File size: 6.9 KB
Line 
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/include/audio_device.h"
12
13namespace webrtc {
14
15class FakeAudioDeviceModule : public AudioDeviceModule {
16 public:
17  FakeAudioDeviceModule() {}
18  virtual ~FakeAudioDeviceModule() {}
19  virtual int32_t AddRef() { return 0; }
20  virtual int32_t Release() { return 0; }
21  virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) {
22    return 0;
23  }
24  virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) {
25    return 0;
26  }
27  virtual int32_t Init() { return 0; }
28  virtual int32_t SpeakerIsAvailable(bool* available) {
29    *available = true;
30    return 0;
31  }
32  virtual int32_t InitSpeaker() { return 0; }
33  virtual int32_t SetPlayoutDevice(uint16_t index) { return 0; }
34  virtual int32_t SetPlayoutDevice(WindowsDeviceType device) { return 0; }
35  virtual int32_t SetStereoPlayout(bool enable) { return 0; }
36  virtual int32_t StopPlayout() { return 0; }
37  virtual int32_t MicrophoneIsAvailable(bool* available) {
38    *available = true;
39    return 0;
40  }
41  virtual int32_t InitMicrophone() { return 0; }
42  virtual int32_t SetRecordingDevice(uint16_t index) { return 0; }
43  virtual int32_t SetRecordingDevice(WindowsDeviceType device) { return 0; }
44  virtual int32_t SetStereoRecording(bool enable) { return 0; }
45  virtual int32_t SetAGC(bool enable) { return 0; }
46  virtual int32_t StopRecording() { return 0; }
47  virtual int32_t TimeUntilNextProcess() { return 0; }
48  virtual int32_t Process() { return 0; }
49  virtual int32_t Terminate() { return 0; }
50
51  virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const { return 0; }
52  virtual ErrorCode LastError() const { return kAdmErrNone; }
53  virtual bool Initialized() const { return true; }
54  virtual int16_t PlayoutDevices() { return 0; }
55  virtual int16_t RecordingDevices() { return 0; }
56  virtual int32_t PlayoutDeviceName(uint16_t index,
57                            char name[kAdmMaxDeviceNameSize],
58                            char guid[kAdmMaxGuidSize]) {
59    return 0;
60  }
61  virtual int32_t RecordingDeviceName(uint16_t index,
62                              char name[kAdmMaxDeviceNameSize],
63                              char guid[kAdmMaxGuidSize]) {
64    return 0;
65  }
66  virtual int32_t PlayoutIsAvailable(bool* available) { return 0; }
67  virtual int32_t InitPlayout() { return 0; }
68  virtual bool PlayoutIsInitialized() const { return true; }
69  virtual int32_t RecordingIsAvailable(bool* available) { return 0; }
70  virtual int32_t InitRecording() { return 0; }
71  virtual bool RecordingIsInitialized() const { return true; }
72  virtual int32_t StartPlayout() { return 0; }
73  virtual bool Playing() const { return false; }
74  virtual int32_t StartRecording() { return 0; }
75  virtual bool Recording() const { return false; }
76  virtual bool AGC() const { return true; }
77  virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
78                           uint16_t volumeRight) {
79    return 0;
80  }
81  virtual int32_t WaveOutVolume(uint16_t* volumeLeft,
82                        uint16_t* volumeRight) const {
83    return 0;
84  }
85  virtual bool SpeakerIsInitialized() const { return true; }
86  virtual bool MicrophoneIsInitialized() const { return true; }
87  virtual int32_t SpeakerVolumeIsAvailable(bool* available) { return 0; }
88  virtual int32_t SetSpeakerVolume(uint32_t volume) { return 0; }
89  virtual int32_t SpeakerVolume(uint32_t* volume) const { return 0; }
90  virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const { return 0; }
91  virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const { return 0; }
92  virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const { return 0; }
93  virtual int32_t MicrophoneVolumeIsAvailable(bool* available) { return 0; }
94  virtual int32_t SetMicrophoneVolume(uint32_t volume) { return 0; }
95  virtual int32_t MicrophoneVolume(uint32_t* volume) const { return 0; }
96  virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const { return 0; }
97  virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const { return 0; }
98  virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const {
99    return 0;
100  }
101  virtual int32_t SpeakerMuteIsAvailable(bool* available) { return 0; }
102  virtual int32_t SetSpeakerMute(bool enable) { return 0; }
103  virtual int32_t SpeakerMute(bool* enabled) const { return 0; }
104  virtual int32_t MicrophoneMuteIsAvailable(bool* available) { return 0; }
105  virtual int32_t SetMicrophoneMute(bool enable) { return 0; }
106  virtual int32_t MicrophoneMute(bool* enabled) const { return 0; }
107  virtual int32_t MicrophoneBoostIsAvailable(bool* available) { return 0; }
108  virtual int32_t SetMicrophoneBoost(bool enable) { return 0; }
109  virtual int32_t MicrophoneBoost(bool* enabled) const { return 0; }
110  virtual int32_t StereoPlayoutIsAvailable(bool* available) const {
111    *available = false;
112    return 0;
113  }
114  virtual int32_t StereoPlayout(bool* enabled) const { return 0; }
115  virtual int32_t StereoRecordingIsAvailable(bool* available) const {
116    *available = false;
117    return 0;
118  }
119  virtual int32_t StereoRecording(bool* enabled) const { return 0; }
120  virtual int32_t SetRecordingChannel(const ChannelType channel) { return 0; }
121  virtual int32_t RecordingChannel(ChannelType* channel) const { return 0; }
122  virtual int32_t SetPlayoutBuffer(const BufferType type,
123                           uint16_t sizeMS = 0) {
124    return 0;
125  }
126  virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
127    return 0;
128  }
129  virtual int32_t PlayoutDelay(uint16_t* delayMS) const { return 0; }
130  virtual int32_t RecordingDelay(uint16_t* delayMS) const { return 0; }
131  virtual int32_t CPULoad(uint16_t* load) const { return 0; }
132  virtual int32_t StartRawOutputFileRecording(
133      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
134    return 0;
135  }
136  virtual int32_t StopRawOutputFileRecording() { return 0; }
137  virtual int32_t StartRawInputFileRecording(
138      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
139    return 0;
140  }
141  virtual int32_t StopRawInputFileRecording() { return 0; }
142  virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) {
143    return 0;
144  }
145  virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const {
146    return 0;
147  }
148  virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) {
149    return 0;
150  }
151  virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const { return 0; }
152  virtual int32_t ResetAudioDevice() { return 0; }
153  virtual int32_t SetLoudspeakerStatus(bool enable) { return 0; }
154  virtual int32_t GetLoudspeakerStatus(bool* enabled) const { return 0; }
155  virtual int32_t EnableBuiltInAEC(bool enable) { return -1; }
156  virtual bool BuiltInAECIsEnabled() const { return false; }
157};
158
159}  // namespace webrtc
Note: See TracBrowser for help on using the repository browser.