1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/media/webrtc_audio_device_not_impl.h"
6
7 namespace {
8
9 const int64 kMillisecondsBetweenProcessCalls = 5000;
10
11 } // namespace
12
13 namespace content {
14
WebRtcAudioDeviceNotImpl()15 WebRtcAudioDeviceNotImpl::WebRtcAudioDeviceNotImpl()
16 : last_process_time_(base::TimeTicks::Now()) {
17 }
18
ChangeUniqueId(const int32_t id)19 int32_t WebRtcAudioDeviceNotImpl::ChangeUniqueId(const int32_t id) {
20 return 0;
21 }
22
TimeUntilNextProcess()23 int32_t WebRtcAudioDeviceNotImpl::TimeUntilNextProcess() {
24 base::TimeDelta delta_time = (base::TimeTicks::Now() - last_process_time_);
25 int64 time_until_next =
26 kMillisecondsBetweenProcessCalls - delta_time.InMilliseconds();
27 return static_cast<int32_t>(time_until_next);
28 }
29
Process()30 int32_t WebRtcAudioDeviceNotImpl::Process() {
31 last_process_time_ = base::TimeTicks::Now();
32 return 0;
33 }
34
RegisterEventObserver(webrtc::AudioDeviceObserver * event_callback)35 int32_t WebRtcAudioDeviceNotImpl::RegisterEventObserver(
36 webrtc::AudioDeviceObserver* event_callback) {
37 return 0;
38 }
39
ActiveAudioLayer(AudioLayer * audio_layer) const40 int32_t WebRtcAudioDeviceNotImpl::ActiveAudioLayer(
41 AudioLayer* audio_layer) const {
42 return 0;
43 }
44
45 webrtc::AudioDeviceModule::ErrorCode
LastError() const46 WebRtcAudioDeviceNotImpl::LastError() const {
47 return AudioDeviceModule::kAdmErrNone;
48 }
49
PlayoutDevices()50 int16_t WebRtcAudioDeviceNotImpl::PlayoutDevices() {
51 return 0;
52 }
53
RecordingDevices()54 int16_t WebRtcAudioDeviceNotImpl::RecordingDevices() {
55 return 0;
56 }
57
PlayoutDeviceName(uint16_t index,char name[webrtc::kAdmMaxDeviceNameSize],char guid[webrtc::kAdmMaxGuidSize])58 int32_t WebRtcAudioDeviceNotImpl::PlayoutDeviceName(
59 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize],
60 char guid[webrtc::kAdmMaxGuidSize]) {
61 return 0;
62 }
63
RecordingDeviceName(uint16_t index,char name[webrtc::kAdmMaxDeviceNameSize],char guid[webrtc::kAdmMaxGuidSize])64 int32_t WebRtcAudioDeviceNotImpl::RecordingDeviceName(
65 uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize],
66 char guid[webrtc::kAdmMaxGuidSize]) {
67 return 0;
68 }
69
SetPlayoutDevice(uint16_t index)70 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutDevice(uint16_t index) {
71 return 0;
72 }
73
SetPlayoutDevice(WindowsDeviceType device)74 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutDevice(WindowsDeviceType device) {
75 return 0;
76 }
77
SetRecordingDevice(uint16_t index)78 int32_t WebRtcAudioDeviceNotImpl::SetRecordingDevice(uint16_t index) {
79 return 0;
80 }
81
SetRecordingDevice(WindowsDeviceType device)82 int32_t WebRtcAudioDeviceNotImpl::SetRecordingDevice(WindowsDeviceType device) {
83 return 0;
84 }
85
InitPlayout()86 int32_t WebRtcAudioDeviceNotImpl::InitPlayout() {
87 return 0;
88 }
89
InitRecording()90 int32_t WebRtcAudioDeviceNotImpl::InitRecording() {
91 return 0;
92 }
93
SetWaveOutVolume(uint16_t volume_left,uint16_t volume_right)94 int32_t WebRtcAudioDeviceNotImpl::SetWaveOutVolume(uint16_t volume_left,
95 uint16_t volume_right) {
96 return 0;
97 }
98
WaveOutVolume(uint16_t * volume_left,uint16_t * volume_right) const99 int32_t WebRtcAudioDeviceNotImpl::WaveOutVolume(
100 uint16_t* volume_left, uint16_t* volume_right) const {
101 return 0;
102 }
103
SpeakerIsAvailable(bool * available)104 int32_t WebRtcAudioDeviceNotImpl::SpeakerIsAvailable(bool* available) {
105 return 0;
106 }
107
InitSpeaker()108 int32_t WebRtcAudioDeviceNotImpl::InitSpeaker() {
109 return 0;
110 }
111
SpeakerIsInitialized() const112 bool WebRtcAudioDeviceNotImpl::SpeakerIsInitialized() const {
113 return 0;
114 }
115
MicrophoneIsAvailable(bool * available)116 int32_t WebRtcAudioDeviceNotImpl::MicrophoneIsAvailable(bool* available) {
117 return 0;
118 }
119
InitMicrophone()120 int32_t WebRtcAudioDeviceNotImpl::InitMicrophone() {
121 return 0;
122 }
123
MicrophoneIsInitialized() const124 bool WebRtcAudioDeviceNotImpl::MicrophoneIsInitialized() const {
125 return 0;
126 }
127
SpeakerVolumeIsAvailable(bool * available)128 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeIsAvailable(bool* available) {
129 return 0;
130 }
131
SetSpeakerVolume(uint32_t volume)132 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerVolume(uint32_t volume) {
133 return 0;
134 }
135
SpeakerVolume(uint32_t * volume) const136 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolume(uint32_t* volume) const {
137 return 0;
138 }
139
MaxSpeakerVolume(uint32_t * max_volume) const140 int32_t WebRtcAudioDeviceNotImpl::MaxSpeakerVolume(uint32_t* max_volume) const {
141 return 0;
142 }
143
MinSpeakerVolume(uint32_t * min_volume) const144 int32_t WebRtcAudioDeviceNotImpl::MinSpeakerVolume(uint32_t* min_volume) const {
145 return 0;
146 }
147
SpeakerVolumeStepSize(uint16_t * step_size) const148 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeStepSize(
149 uint16_t* step_size) const {
150 return 0;
151 }
152
MicrophoneVolumeIsAvailable(bool * available)153 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeIsAvailable(bool* available) {
154 return 0;
155 }
156
MicrophoneVolumeStepSize(uint16_t * step_size) const157 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeStepSize(
158 uint16_t* step_size) const {
159 return 0;
160 }
161
SpeakerMuteIsAvailable(bool * available)162 int32_t WebRtcAudioDeviceNotImpl::SpeakerMuteIsAvailable(bool* available) {
163 return 0;
164 }
165
SetSpeakerMute(bool enable)166 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerMute(bool enable) {
167 return 0;
168 }
169
SpeakerMute(bool * enabled) const170 int32_t WebRtcAudioDeviceNotImpl::SpeakerMute(bool* enabled) const {
171 return 0;
172 }
173
MicrophoneMuteIsAvailable(bool * available)174 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMuteIsAvailable(bool* available) {
175 return 0;
176 }
177
SetMicrophoneMute(bool enable)178 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneMute(bool enable) {
179 return 0;
180 }
181
MicrophoneMute(bool * enabled) const182 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMute(bool* enabled) const {
183 return 0;
184 }
185
MicrophoneBoostIsAvailable(bool * available)186 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoostIsAvailable(bool* available) {
187 return 0;
188 }
189
SetMicrophoneBoost(bool enable)190 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneBoost(bool enable) {
191 return 0;
192 }
193
MicrophoneBoost(bool * enabled) const194 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoost(bool* enabled) const {
195 return 0;
196 }
197
SetStereoPlayout(bool enable)198 int32_t WebRtcAudioDeviceNotImpl::SetStereoPlayout(bool enable) {
199 return 0;
200 }
201
StereoPlayout(bool * enabled) const202 int32_t WebRtcAudioDeviceNotImpl::StereoPlayout(bool* enabled) const {
203 return 0;
204 }
205
SetStereoRecording(bool enable)206 int32_t WebRtcAudioDeviceNotImpl::SetStereoRecording(bool enable) {
207 return 0;
208 }
209
StereoRecording(bool * enabled) const210 int32_t WebRtcAudioDeviceNotImpl::StereoRecording(bool* enabled) const {
211 return 0;
212 }
213
SetRecordingChannel(const ChannelType channel)214 int32_t WebRtcAudioDeviceNotImpl::SetRecordingChannel(
215 const ChannelType channel) {
216 return 0;
217 }
218
RecordingChannel(ChannelType * channel) const219 int32_t WebRtcAudioDeviceNotImpl::RecordingChannel(ChannelType* channel) const {
220 return 0;
221 }
222
SetPlayoutBuffer(const BufferType type,uint16_t size_ms)223 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutBuffer(const BufferType type,
224 uint16_t size_ms) {
225 return 0;
226 }
227
PlayoutBuffer(BufferType * type,uint16_t * size_ms) const228 int32_t WebRtcAudioDeviceNotImpl::PlayoutBuffer(BufferType* type,
229 uint16_t* size_ms) const {
230 return 0;
231 }
232
CPULoad(uint16_t * load) const233 int32_t WebRtcAudioDeviceNotImpl::CPULoad(uint16_t* load) const {
234 return 0;
235 }
236
StartRawOutputFileRecording(const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize])237 int32_t WebRtcAudioDeviceNotImpl::StartRawOutputFileRecording(
238 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) {
239 return 0;
240 }
241
StopRawOutputFileRecording()242 int32_t WebRtcAudioDeviceNotImpl::StopRawOutputFileRecording() {
243 return 0;
244 }
245
StartRawInputFileRecording(const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize])246 int32_t WebRtcAudioDeviceNotImpl::StartRawInputFileRecording(
247 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) {
248 return 0;
249 }
250
StopRawInputFileRecording()251 int32_t WebRtcAudioDeviceNotImpl::StopRawInputFileRecording() {
252 return 0;
253 }
254
SetRecordingSampleRate(const uint32_t samples_per_sec)255 int32_t WebRtcAudioDeviceNotImpl::SetRecordingSampleRate(
256 const uint32_t samples_per_sec) {
257 return 0;
258 }
259
SetPlayoutSampleRate(const uint32_t samples_per_sec)260 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutSampleRate(
261 const uint32_t samples_per_sec) {
262 return 0;
263 }
264
ResetAudioDevice()265 int32_t WebRtcAudioDeviceNotImpl::ResetAudioDevice() {
266 return 0;
267 }
268
SetLoudspeakerStatus(bool enable)269 int32_t WebRtcAudioDeviceNotImpl::SetLoudspeakerStatus(bool enable) {
270 return 0;
271 }
272
GetLoudspeakerStatus(bool * enabled) const273 int32_t WebRtcAudioDeviceNotImpl::GetLoudspeakerStatus(bool* enabled) const {
274 return 0;
275 }
276
SetAGC(bool enable)277 int32_t WebRtcAudioDeviceNotImpl::SetAGC(bool enable) {
278 return 0;
279 }
280
AGC() const281 bool WebRtcAudioDeviceNotImpl::AGC() const {
282 return true;
283 }
284
285 } // namespace content
286