OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 // Create the *Linux* implementation of the Audio Device | 251 // Create the *Linux* implementation of the Audio Device |
252 // | 252 // |
253 #elif defined(WEBRTC_LINUX) | 253 #elif defined(WEBRTC_LINUX) |
254 if ((audioLayer == kLinuxPulseAudio) || | 254 if ((audioLayer == kLinuxPulseAudio) || |
255 (audioLayer == kPlatformDefaultAudio)) { | 255 (audioLayer == kPlatformDefaultAudio)) { |
256 #if defined(LINUX_PULSE) | 256 #if defined(LINUX_PULSE) |
257 LOG(INFO) << "attempting to use the Linux PulseAudio APIs..."; | 257 LOG(INFO) << "attempting to use the Linux PulseAudio APIs..."; |
258 | 258 |
259 // create *Linux PulseAudio* implementation | 259 // create *Linux PulseAudio* implementation |
260 AudioDeviceLinuxPulse* pulseDevice = new AudioDeviceLinuxPulse(Id()); | 260 AudioDeviceLinuxPulse* pulseDevice = new AudioDeviceLinuxPulse(); |
261 if (pulseDevice->Init() == AudioDeviceGeneric::InitStatus::OK) { | 261 if (pulseDevice->Init() == AudioDeviceGeneric::InitStatus::OK) { |
262 ptrAudioDevice = pulseDevice; | 262 ptrAudioDevice = pulseDevice; |
263 LOG(INFO) << "Linux PulseAudio APIs will be utilized"; | 263 LOG(INFO) << "Linux PulseAudio APIs will be utilized"; |
264 } else { | 264 } else { |
265 delete pulseDevice; | 265 delete pulseDevice; |
266 #endif | 266 #endif |
267 #if defined(LINUX_ALSA) | 267 #if defined(LINUX_ALSA) |
268 // create *Linux ALSA Audio* implementation | 268 // create *Linux ALSA Audio* implementation |
269 ptrAudioDevice = new AudioDeviceLinuxALSA(Id()); | 269 ptrAudioDevice = new AudioDeviceLinuxALSA(); |
270 if (ptrAudioDevice != NULL) { | 270 if (ptrAudioDevice != NULL) { |
271 // Pulse Audio was not supported => revert to ALSA instead | 271 // Pulse Audio was not supported => revert to ALSA instead |
272 _platformAudioLayer = | 272 _platformAudioLayer = |
273 kLinuxAlsaAudio; // modify the state set at construction | 273 kLinuxAlsaAudio; // modify the state set at construction |
274 LOG(WARNING) << "Linux PulseAudio is *not* supported => ALSA APIs will " | 274 LOG(WARNING) << "Linux PulseAudio is *not* supported => ALSA APIs will " |
275 "be utilized instead"; | 275 "be utilized instead"; |
276 } | 276 } |
277 #endif | 277 #endif |
278 #if defined(LINUX_PULSE) | 278 #if defined(LINUX_PULSE) |
279 } | 279 } |
280 #endif | 280 #endif |
281 } else if (audioLayer == kLinuxAlsaAudio) { | 281 } else if (audioLayer == kLinuxAlsaAudio) { |
282 #if defined(LINUX_ALSA) | 282 #if defined(LINUX_ALSA) |
283 // create *Linux ALSA Audio* implementation | 283 // create *Linux ALSA Audio* implementation |
284 ptrAudioDevice = new AudioDeviceLinuxALSA(Id()); | 284 ptrAudioDevice = new AudioDeviceLinuxALSA(); |
285 LOG(INFO) << "Linux ALSA APIs will be utilized"; | 285 LOG(INFO) << "Linux ALSA APIs will be utilized"; |
286 #endif | 286 #endif |
287 } | 287 } |
288 #endif // #if defined(WEBRTC_LINUX) | 288 #endif // #if defined(WEBRTC_LINUX) |
289 | 289 |
290 // Create the *iPhone* implementation of the Audio Device | 290 // Create the *iPhone* implementation of the Audio Device |
291 // | 291 // |
292 #if defined(WEBRTC_IOS) | 292 #if defined(WEBRTC_IOS) |
293 if (audioLayer == kPlatformDefaultAudio) { | 293 if (audioLayer == kPlatformDefaultAudio) { |
294 // Create iOS Audio Device implementation. | 294 // Create iOS Audio Device implementation. |
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 // PlatformAudioLayer | 1838 // PlatformAudioLayer |
1839 // ---------------------------------------------------------------------------- | 1839 // ---------------------------------------------------------------------------- |
1840 | 1840 |
1841 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() | 1841 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() |
1842 const { | 1842 const { |
1843 LOG(INFO) << __FUNCTION__; | 1843 LOG(INFO) << __FUNCTION__; |
1844 return _platformAudioLayer; | 1844 return _platformAudioLayer; |
1845 } | 1845 } |
1846 | 1846 |
1847 } // namespace webrtc | 1847 } // namespace webrtc |
OLD | NEW |