| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { | 179 int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { |
| 180 LOG(INFO) << __FUNCTION__; | 180 LOG(INFO) << __FUNCTION__; |
| 181 | 181 |
| 182 AudioDeviceGeneric* ptrAudioDevice(NULL); | 182 AudioDeviceGeneric* ptrAudioDevice(NULL); |
| 183 | 183 |
| 184 #if defined(WEBRTC_DUMMY_AUDIO_BUILD) | 184 #if defined(WEBRTC_DUMMY_AUDIO_BUILD) |
| 185 ptrAudioDevice = new AudioDeviceDummy(Id()); | 185 ptrAudioDevice = new AudioDeviceDummy(Id()); |
| 186 LOG(INFO) << "Dummy Audio APIs will be utilized"; | 186 LOG(INFO) << "Dummy Audio APIs will be utilized"; |
| 187 #elif defined(WEBRTC_DUMMY_FILE_DEVICES) | 187 #elif defined(WEBRTC_DUMMY_FILE_DEVICES) |
| 188 ptrAudioDevice = FileAudioDeviceFactory::CreateFileAudioDevice(Id()); | 188 ptrAudioDevice = FileAudioDeviceFactory::CreateFileAudioDevice(Id()); |
| 189 LOG(INFO) << "Will use file-playing dummy device."; | 189 if (ptrAudioDevice) { |
| 190 LOG(INFO) << "Will use file-playing dummy device."; |
| 191 } else { |
| 192 // Create a dummy device instead. |
| 193 ptrAudioDevice = new AudioDeviceDummy(Id()); |
| 194 LOG(INFO) << "Dummy Audio APIs will be utilized"; |
| 195 } |
| 190 #else | 196 #else |
| 191 AudioLayer audioLayer(PlatformAudioLayer()); | 197 AudioLayer audioLayer(PlatformAudioLayer()); |
| 192 | 198 |
| 193 // Create the *Windows* implementation of the Audio Device | 199 // Create the *Windows* implementation of the Audio Device |
| 194 // | 200 // |
| 195 #if defined(_WIN32) | 201 #if defined(_WIN32) |
| 196 if ((audioLayer == kWindowsWaveAudio) | 202 if ((audioLayer == kWindowsWaveAudio) |
| 197 #if !defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) | 203 #if !defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) |
| 198 // Wave audio is default if Core audio is not supported in this build | 204 // Wave audio is default if Core audio is not supported in this build |
| 199 || (audioLayer == kPlatformDefaultAudio) | 205 || (audioLayer == kPlatformDefaultAudio) |
| (...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 // PlatformAudioLayer | 1875 // PlatformAudioLayer |
| 1870 // ---------------------------------------------------------------------------- | 1876 // ---------------------------------------------------------------------------- |
| 1871 | 1877 |
| 1872 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() | 1878 AudioDeviceModule::AudioLayer AudioDeviceModuleImpl::PlatformAudioLayer() |
| 1873 const { | 1879 const { |
| 1874 LOG(INFO) << __FUNCTION__; | 1880 LOG(INFO) << __FUNCTION__; |
| 1875 return _platformAudioLayer; | 1881 return _platformAudioLayer; |
| 1876 } | 1882 } |
| 1877 | 1883 |
| 1878 } // namespace webrtc | 1884 } // namespace webrtc |
| OLD | NEW |