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

Side by Side Diff: webrtc/modules/audio_device/dummy/file_audio_device_factory.cc

Issue 2715893002: Fixed build error when rtc_use_dummy_audio_file_devices=true (Closed)
Patch Set: Use RTC_DCHECK() instead of assert() Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698