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
InitSpeaker()104 int32_t WebRtcAudioDeviceNotImpl::InitSpeaker() {
105 return 0;
106 }
107
SpeakerIsInitialized() const108 bool WebRtcAudioDeviceNotImpl::SpeakerIsInitialized() const {
109 return 0;
110 }
111
InitMicrophone()112 int32_t WebRtcAudioDeviceNotImpl::InitMicrophone() {
113 return 0;
114 }
115
MicrophoneIsInitialized() const116 bool WebRtcAudioDeviceNotImpl::MicrophoneIsInitialized() const {
117 return 0;
118 }
119
SpeakerVolumeIsAvailable(bool * available)120 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeIsAvailable(bool* available) {
121 return 0;
122 }
123
SetSpeakerVolume(uint32_t volume)124 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerVolume(uint32_t volume) {
125 return 0;
126 }
127
SpeakerVolume(uint32_t * volume) const128 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolume(uint32_t* volume) const {
129 return 0;
130 }
131
MaxSpeakerVolume(uint32_t * max_volume) const132 int32_t WebRtcAudioDeviceNotImpl::MaxSpeakerVolume(uint32_t* max_volume) const {
133 return 0;
134 }
135
MinSpeakerVolume(uint32_t * min_volume) const136 int32_t WebRtcAudioDeviceNotImpl::MinSpeakerVolume(uint32_t* min_volume) const {
137 return 0;
138 }
139
SpeakerVolumeStepSize(uint16_t * step_size) const140 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeStepSize(
141 uint16_t* step_size) const {
142 return 0;
143 }
144
MicrophoneVolumeIsAvailable(bool * available)145 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeIsAvailable(bool* available) {
146 return 0;
147 }
148
MicrophoneVolumeStepSize(uint16_t * step_size) const149 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeStepSize(
150 uint16_t* step_size) const {
151 return 0;
152 }
153
SpeakerMuteIsAvailable(bool * available)154 int32_t WebRtcAudioDeviceNotImpl::SpeakerMuteIsAvailable(bool* available) {
155 return 0;
156 }
157
SetSpeakerMute(bool enable)158 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerMute(bool enable) {
159 return 0;
160 }
161
SpeakerMute(bool * enabled) const162 int32_t WebRtcAudioDeviceNotImpl::SpeakerMute(bool* enabled) const {
163 return 0;
164 }
165
MicrophoneMuteIsAvailable(bool * available)166 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMuteIsAvailable(bool* available) {
167 return 0;
168 }
169
SetMicrophoneMute(bool enable)170 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneMute(bool enable) {
171 return 0;
172 }
173
MicrophoneMute(bool * enabled) const174 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMute(bool* enabled) const {
175 return 0;
176 }
177
MicrophoneBoostIsAvailable(bool * available)178 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoostIsAvailable(bool* available) {
179 return 0;
180 }
181
SetMicrophoneBoost(bool enable)182 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneBoost(bool enable) {
183 return 0;
184 }
185
MicrophoneBoost(bool * enabled) const186 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoost(bool* enabled) const {
187 return 0;
188 }
189
SetStereoPlayout(bool enable)190 int32_t WebRtcAudioDeviceNotImpl::SetStereoPlayout(bool enable) {
191 return 0;
192 }
193
StereoPlayout(bool * enabled) const194 int32_t WebRtcAudioDeviceNotImpl::StereoPlayout(bool* enabled) const {
195 return 0;
196 }
197
SetStereoRecording(bool enable)198 int32_t WebRtcAudioDeviceNotImpl::SetStereoRecording(bool enable) {
199 return 0;
200 }
201
StereoRecording(bool * enabled) const202 int32_t WebRtcAudioDeviceNotImpl::StereoRecording(bool* enabled) const {
203 return 0;
204 }
205
SetRecordingChannel(const ChannelType channel)206 int32_t WebRtcAudioDeviceNotImpl::SetRecordingChannel(
207 const ChannelType channel) {
208 return 0;
209 }
210
RecordingChannel(ChannelType * channel) const211 int32_t WebRtcAudioDeviceNotImpl::RecordingChannel(ChannelType* channel) const {
212 return 0;
213 }
214
SetPlayoutBuffer(const BufferType type,uint16_t size_ms)215 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutBuffer(const BufferType type,
216 uint16_t size_ms) {
217 return 0;
218 }
219
PlayoutBuffer(BufferType * type,uint16_t * size_ms) const220 int32_t WebRtcAudioDeviceNotImpl::PlayoutBuffer(BufferType* type,
221 uint16_t* size_ms) const {
222 return 0;
223 }
224
CPULoad(uint16_t * load) const225 int32_t WebRtcAudioDeviceNotImpl::CPULoad(uint16_t* load) const {
226 return 0;
227 }
228
StartRawOutputFileRecording(const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize])229 int32_t WebRtcAudioDeviceNotImpl::StartRawOutputFileRecording(
230 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) {
231 return 0;
232 }
233
StopRawOutputFileRecording()234 int32_t WebRtcAudioDeviceNotImpl::StopRawOutputFileRecording() {
235 return 0;
236 }
237
StartRawInputFileRecording(const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize])238 int32_t WebRtcAudioDeviceNotImpl::StartRawInputFileRecording(
239 const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) {
240 return 0;
241 }
242
StopRawInputFileRecording()243 int32_t WebRtcAudioDeviceNotImpl::StopRawInputFileRecording() {
244 return 0;
245 }
246
SetRecordingSampleRate(const uint32_t samples_per_sec)247 int32_t WebRtcAudioDeviceNotImpl::SetRecordingSampleRate(
248 const uint32_t samples_per_sec) {
249 return 0;
250 }
251
SetPlayoutSampleRate(const uint32_t samples_per_sec)252 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutSampleRate(
253 const uint32_t samples_per_sec) {
254 return 0;
255 }
256
ResetAudioDevice()257 int32_t WebRtcAudioDeviceNotImpl::ResetAudioDevice() {
258 return 0;
259 }
260
SetLoudspeakerStatus(bool enable)261 int32_t WebRtcAudioDeviceNotImpl::SetLoudspeakerStatus(bool enable) {
262 return 0;
263 }
264
GetLoudspeakerStatus(bool * enabled) const265 int32_t WebRtcAudioDeviceNotImpl::GetLoudspeakerStatus(bool* enabled) const {
266 return 0;
267 }
268
SetAGC(bool enable)269 int32_t WebRtcAudioDeviceNotImpl::SetAGC(bool enable) {
270 return 0;
271 }
272
AGC() const273 bool WebRtcAudioDeviceNotImpl::AGC() const {
274 return true;
275 }
276
277 } // namespace content
278