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

Unified Diff: webrtc/modules/audio_device/audio_device_impl.cc

Issue 2250853002: Add code for dummy file audio to fallback to dummy audio. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/dummy/file_audio_device_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | webrtc/modules/audio_device/dummy/file_audio_device_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698