Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_device / dummy / file_audio_device_factory.cc
index db35bf1..5e25230 100644 (file)
@@ -32,12 +32,19 @@ FileAudioDevice* FileAudioDeviceFactory::CreateFileAudioDevice(
 
 void FileAudioDeviceFactory::SetFilenamesToUse(
     const char* inputAudioFilename, const char* outputAudioFilename) {
+#ifdef WEBRTC_DUMMY_FILE_DEVICES
   assert(strlen(inputAudioFilename) < MAX_FILENAME_LEN &&
          strlen(outputAudioFilename) < MAX_FILENAME_LEN);
 
   // Copy the strings since we don't know the lifetime of the input pointers.
   strncpy(_inputAudioFilename, inputAudioFilename, MAX_FILENAME_LEN);
   strncpy(_outputAudioFilename, outputAudioFilename, MAX_FILENAME_LEN);
+#else
+  // Sanity: must be compiled with the right define to run this.
+  printf("Trying to use dummy file devices, but is not compiled "
+         "with WEBRTC_DUMMY_FILE_DEVICES. Bailing out.\n");
+  exit(1);
+#endif
 }
 
 }  // namespace webrtc