| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 21 matching lines...) Expand all Loading... |
| 32 << "audio."; | 32 << "audio."; |
| 33 | 33 |
| 34 return nullptr; | 34 return nullptr; |
| 35 } | 35 } |
| 36 return new FileAudioDevice(id, _inputAudioFilename, _outputAudioFilename); | 36 return new FileAudioDevice(id, _inputAudioFilename, _outputAudioFilename); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void FileAudioDeviceFactory::SetFilenamesToUse( | 39 void FileAudioDeviceFactory::SetFilenamesToUse( |
| 40 const char* inputAudioFilename, const char* outputAudioFilename) { | 40 const char* inputAudioFilename, const char* outputAudioFilename) { |
| 41 #ifdef WEBRTC_DUMMY_FILE_DEVICES | 41 #ifdef WEBRTC_DUMMY_FILE_DEVICES |
| 42 assert(strlen(inputAudioFilename) < MAX_FILENAME_LEN && | 42 RTC_DCHECK(strlen(inputAudioFilename) < MAX_FILENAME_LEN && |
| 43 strlen(outputAudioFilename) < MAX_FILENAME_LEN); | 43 strlen(outputAudioFilename) < MAX_FILENAME_LEN); |
| 44 | 44 |
| 45 // Copy the strings since we don't know the lifetime of the input pointers. | 45 // Copy the strings since we don't know the lifetime of the input pointers. |
| 46 strncpy(_inputAudioFilename, inputAudioFilename, MAX_FILENAME_LEN); | 46 strncpy(_inputAudioFilename, inputAudioFilename, MAX_FILENAME_LEN); |
| 47 strncpy(_outputAudioFilename, outputAudioFilename, MAX_FILENAME_LEN); | 47 strncpy(_outputAudioFilename, outputAudioFilename, MAX_FILENAME_LEN); |
| 48 _isConfigured = true; | 48 _isConfigured = true; |
| 49 #else | 49 #else |
| 50 // Sanity: must be compiled with the right define to run this. | 50 // Sanity: must be compiled with the right define to run this. |
| 51 printf("Trying to use dummy file devices, but is not compiled " | 51 printf("Trying to use dummy file devices, but is not compiled " |
| 52 "with WEBRTC_DUMMY_FILE_DEVICES. Bailing out.\n"); | 52 "with WEBRTC_DUMMY_FILE_DEVICES. Bailing out.\n"); |
| 53 std::exit(1); | 53 std::exit(1); |
| 54 #endif | 54 #endif |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace webrtc | 57 } // namespace webrtc |
| OLD | NEW |