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