Index: webrtc/modules/audio_device/audio_device_impl.cc |
diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc |
index bfcbb00e48a492bdcffa20b9870411ba3d04ad56..d8dce9e88c7295f5ae952e2762bd5ee1d42df8e8 100644 |
--- a/webrtc/modules/audio_device/audio_device_impl.cc |
+++ b/webrtc/modules/audio_device/audio_device_impl.cc |
@@ -186,7 +186,13 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() { |
LOG(INFO) << "Dummy Audio APIs will be utilized"; |
#elif defined(WEBRTC_DUMMY_FILE_DEVICES) |
ptrAudioDevice = FileAudioDeviceFactory::CreateFileAudioDevice(Id()); |
- LOG(INFO) << "Will use file-playing dummy device."; |
+ if (ptrAudioDevice) { |
+ LOG(INFO) << "Will use file-playing dummy device."; |
+ } else { |
+ // Create a dummy device instead. |
+ ptrAudioDevice = new AudioDeviceDummy(Id()); |
+ LOG(INFO) << "Dummy Audio APIs will be utilized"; |
+ } |
#else |
AudioLayer audioLayer(PlatformAudioLayer()); |