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

Unified Diff: webrtc/modules/audio_device/dummy/file_audio_device_factory.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 | « webrtc/modules/audio_device/audio_device_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/dummy/file_audio_device_factory.cc
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc b/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc
index 7c6d16f129d0b77a105f4deca0d7bb331a55ad64..db9bad72dd3cbe1835b179322ef7c5297f3aa809 100644
--- a/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc
+++ b/webrtc/modules/audio_device/dummy/file_audio_device_factory.cc
@@ -13,6 +13,7 @@
#include <cstdlib>
#include <cstring>
+#include "webrtc/base/logging.h"
#include "webrtc/modules/audio_device/dummy/file_audio_device.h"
namespace webrtc {
@@ -24,10 +25,13 @@ char FileAudioDeviceFactory::_outputAudioFilename[MAX_FILENAME_LEN] = "";
FileAudioDevice* FileAudioDeviceFactory::CreateFileAudioDevice(
const int32_t id) {
// Bail out here if the files haven't been set explicitly.
+ // audio_device_impl.cc should then fall back to dummy audio.
if (!_isConfigured) {
- printf("Was compiled with WEBRTC_DUMMY_AUDIO_PLAY_STATIC_FILE "
- "but did not set input/output files to use. Bailing out.\n");
- std::exit(1);
+ LOG(LS_WARNING) << "WebRTC configured with WEBRTC_DUMMY_FILE_DEVICES but "
+ << "no device files supplied. Will fall back to dummy "
+ << "audio.";
+
+ return nullptr;
}
return new FileAudioDevice(id, _inputAudioFilename, _outputAudioFilename);
}
« no previous file with comments | « webrtc/modules/audio_device/audio_device_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698