Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm

Issue 1206783002: Cleanup of iOS AudioDevice implementation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from tkchin@ Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2015 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/ios/audio_device_not_implemented_ios.h"
12
13 #include "webrtc/base/checks.h"
14 #include "webrtc/base/logging.h"
15
16 #define TAG "AudioDeviceNotImplementedIOS::"
17
18 namespace webrtc {
19
20 AudioDeviceNotImplementedIOS::AudioDeviceNotImplementedIOS() {
21 }
22
23 int32_t AudioDeviceNotImplementedIOS::ActiveAudioLayer(
24 AudioDeviceModule::AudioLayer& audioLayer) const {
25 audioLayer = AudioDeviceModule::kPlatformDefaultAudio;
26 return 0;
27 }
28
29 int32_t AudioDeviceNotImplementedIOS::ResetAudioDevice() {
30 RTC_NOTREACHED() << "Not implemented";
31 return -1;
32 }
33
34 int16_t AudioDeviceNotImplementedIOS::PlayoutDevices() {
35 // TODO(henrika): improve.
36 LOG_F(LS_WARNING) << "Not implemented";
37 return (int16_t)1;
38 }
39
40 int16_t AudioDeviceNotImplementedIOS::RecordingDevices() {
41 // TODO(henrika): improve.
42 LOG_F(LS_WARNING) << "Not implemented";
43 return (int16_t)1;
44 }
45
46 int32_t AudioDeviceNotImplementedIOS::InitSpeaker() {
47 return 0;
48 }
49
50 bool AudioDeviceNotImplementedIOS::SpeakerIsInitialized() const {
51 return true;
52 }
53
54 int32_t AudioDeviceNotImplementedIOS::SpeakerVolumeIsAvailable(
55 bool& available) {
56 available = false;
57 return 0;
58 }
59
60 int32_t AudioDeviceNotImplementedIOS::SetSpeakerVolume(uint32_t volume) {
61 RTC_NOTREACHED() << "Not implemented";
62 return -1;
63 }
64
65 int32_t AudioDeviceNotImplementedIOS::SpeakerVolume(uint32_t& volume) const {
66 RTC_NOTREACHED() << "Not implemented";
67 return -1;
68 }
69
70 int32_t AudioDeviceNotImplementedIOS::SetWaveOutVolume(uint16_t, uint16_t) {
71 RTC_NOTREACHED() << "Not implemented";
72 return -1;
73 }
74
75 int32_t AudioDeviceNotImplementedIOS::WaveOutVolume(uint16_t&,
76 uint16_t&) const {
77 RTC_NOTREACHED() << "Not implemented";
78 return -1;
79 }
80
81 int32_t AudioDeviceNotImplementedIOS::MaxSpeakerVolume(
82 uint32_t& maxVolume) const {
83 RTC_NOTREACHED() << "Not implemented";
84 return -1;
85 }
86
87 int32_t AudioDeviceNotImplementedIOS::MinSpeakerVolume(
88 uint32_t& minVolume) const {
89 RTC_NOTREACHED() << "Not implemented";
90 return -1;
91 }
92
93 int32_t AudioDeviceNotImplementedIOS::SpeakerVolumeStepSize(
94 uint16_t& stepSize) const {
95 RTC_NOTREACHED() << "Not implemented";
96 return -1;
97 }
98
99 int32_t AudioDeviceNotImplementedIOS::SpeakerMuteIsAvailable(bool& available) {
100 available = false;
101 return 0;
102 }
103
104 int32_t AudioDeviceNotImplementedIOS::SetSpeakerMute(bool enable) {
105 RTC_NOTREACHED() << "Not implemented";
106 return -1;
107 }
108
109 int32_t AudioDeviceNotImplementedIOS::SpeakerMute(bool& enabled) const {
110 RTC_NOTREACHED() << "Not implemented";
111 return -1;
112 }
113
114 int32_t AudioDeviceNotImplementedIOS::SetPlayoutDevice(uint16_t index) {
115 LOG_F(LS_WARNING) << "Not implemented";
116 return 0;
117 }
118
119 int32_t AudioDeviceNotImplementedIOS::SetPlayoutDevice(
120 AudioDeviceModule::WindowsDeviceType) {
121 RTC_NOTREACHED() << "Not implemented";
122 return -1;
123 }
124
125 bool AudioDeviceNotImplementedIOS::PlayoutWarning() const {
126 return false;
127 }
128
129 bool AudioDeviceNotImplementedIOS::PlayoutError() const {
130 return false;
131 }
132
133 bool AudioDeviceNotImplementedIOS::RecordingWarning() const {
134 return false;
135 }
136
137 bool AudioDeviceNotImplementedIOS::RecordingError() const {
138 return false;
139 }
140
141 int32_t AudioDeviceNotImplementedIOS::InitMicrophone() {
142 return 0;
143 }
144
145 bool AudioDeviceNotImplementedIOS::MicrophoneIsInitialized() const {
146 return true;
147 }
148
149 int32_t AudioDeviceNotImplementedIOS::MicrophoneMuteIsAvailable(
150 bool& available) {
151 available = false;
152 return 0;
153 }
154
155 int32_t AudioDeviceNotImplementedIOS::SetMicrophoneMute(bool enable) {
156 RTC_NOTREACHED() << "Not implemented";
157 return -1;
158 }
159
160 int32_t AudioDeviceNotImplementedIOS::MicrophoneMute(bool& enabled) const {
161 RTC_NOTREACHED() << "Not implemented";
162 return -1;
163 }
164
165 int32_t AudioDeviceNotImplementedIOS::MicrophoneBoostIsAvailable(
166 bool& available) {
167 available = false;
168 return 0;
169 }
170
171 int32_t AudioDeviceNotImplementedIOS::SetMicrophoneBoost(bool enable) {
172 RTC_NOTREACHED() << "Not implemented";
173 return -1;
174 }
175
176 int32_t AudioDeviceNotImplementedIOS::MicrophoneBoost(bool& enabled) const {
177 enabled = false;
178 return 0;
179 }
180
181 int32_t AudioDeviceNotImplementedIOS::StereoRecordingIsAvailable(
182 bool& available) {
183 available = false;
184 return 0;
185 }
186
187 int32_t AudioDeviceNotImplementedIOS::SetStereoRecording(bool enable) {
188 LOG_F(LS_WARNING) << "Not implemented";
189 return -1;
190 }
191
192 int32_t AudioDeviceNotImplementedIOS::StereoRecording(bool& enabled) const {
193 enabled = false;
194 return 0;
195 }
196
197 int32_t AudioDeviceNotImplementedIOS::StereoPlayoutIsAvailable(
198 bool& available) {
199 available = false;
200 return 0;
201 }
202
203 int32_t AudioDeviceNotImplementedIOS::SetStereoPlayout(bool enable) {
204 LOG_F(LS_WARNING) << "Not implemented";
205 return -1;
206 }
207
208 int32_t AudioDeviceNotImplementedIOS::StereoPlayout(bool& enabled) const {
209 enabled = false;
210 return 0;
211 }
212
213 int32_t AudioDeviceNotImplementedIOS::SetAGC(bool enable) {
214 if (enable) {
215 RTC_NOTREACHED() << "Should never be called";
216 }
217 return -1;
218 }
219
220 bool AudioDeviceNotImplementedIOS::AGC() const {
221 return false;
222 }
223
224 int32_t AudioDeviceNotImplementedIOS::MicrophoneVolumeIsAvailable(
225 bool& available) {
226 available = false;
227 return 0;
228 }
229
230 int32_t AudioDeviceNotImplementedIOS::SetMicrophoneVolume(uint32_t volume) {
231 RTC_NOTREACHED() << "Not implemented";
232 return -1;
233 }
234
235 int32_t AudioDeviceNotImplementedIOS::MicrophoneVolume(uint32_t& volume) const {
236 RTC_NOTREACHED() << "Not implemented";
237 return -1;
238 }
239
240 int32_t AudioDeviceNotImplementedIOS::MaxMicrophoneVolume(
241 uint32_t& maxVolume) const {
242 RTC_NOTREACHED() << "Not implemented";
243 return -1;
244 }
245
246 int32_t AudioDeviceNotImplementedIOS::MinMicrophoneVolume(
247 uint32_t& minVolume) const {
248 RTC_NOTREACHED() << "Not implemented";
249 return -1;
250 }
251
252 int32_t AudioDeviceNotImplementedIOS::MicrophoneVolumeStepSize(
253 uint16_t& stepSize) const {
254 RTC_NOTREACHED() << "Not implemented";
255 return -1;
256 }
257
258 int32_t AudioDeviceNotImplementedIOS::PlayoutDeviceName(
259 uint16_t index,
260 char name[kAdmMaxDeviceNameSize],
261 char guid[kAdmMaxGuidSize]) {
262 RTC_NOTREACHED() << "Not implemented";
263 return -1;
264 }
265
266 int32_t AudioDeviceNotImplementedIOS::RecordingDeviceName(
267 uint16_t index,
268 char name[kAdmMaxDeviceNameSize],
269 char guid[kAdmMaxGuidSize]) {
270 RTC_NOTREACHED() << "Not implemented";
271 return -1;
272 }
273
274 int32_t AudioDeviceNotImplementedIOS::SetRecordingDevice(uint16_t index) {
275 LOG_F(LS_WARNING) << "Not implemented";
276 return 0;
277 }
278
279 int32_t AudioDeviceNotImplementedIOS::SetRecordingDevice(
280 AudioDeviceModule::WindowsDeviceType) {
281 RTC_NOTREACHED() << "Not implemented";
282 return -1;
283 }
284
285 int32_t AudioDeviceNotImplementedIOS::PlayoutIsAvailable(bool& available) {
286 available = true;
287 return 0;
288 }
289
290 int32_t AudioDeviceNotImplementedIOS::RecordingIsAvailable(bool& available) {
291 available = true;
292 return 0;
293 }
294
295 int32_t AudioDeviceNotImplementedIOS::SetPlayoutBuffer(
296 const AudioDeviceModule::BufferType type,
297 uint16_t sizeMS) {
298 RTC_NOTREACHED() << "Not implemented";
299 return -1;
300 }
301
302 int32_t AudioDeviceNotImplementedIOS::CPULoad(uint16_t&) const {
303 RTC_NOTREACHED() << "Not implemented";
304 return -1;
305 }
306
307 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698