OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 SetAudioScaling(volumeScaling); | 247 SetAudioScaling(volumeScaling); |
248 } else if (_fileFormat == kFileFormatPreencodedFile) { | 248 } else if (_fileFormat == kFileFormatPreencodedFile) { |
249 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, | 249 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, |
250 _fileFormat, codecInst) == -1) { | 250 _fileFormat, codecInst) == -1) { |
251 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize " | 251 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize " |
252 << "pre-encoded file " << fileName; | 252 << "pre-encoded file " << fileName; |
253 return -1; | 253 return -1; |
254 } | 254 } |
255 } else { | 255 } else { |
256 CodecInst* no_inst = NULL; | 256 CodecInst* no_inst = nullptr; |
257 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, | 257 if (_fileModule.StartPlayingAudioFile(fileName, notification, loop, |
258 _fileFormat, no_inst, startPosition, | 258 _fileFormat, no_inst, startPosition, |
259 stopPosition) == -1) { | 259 stopPosition) == -1) { |
260 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize file " | 260 LOG(LS_WARNING) << "StartPlayingFile() failed to initialize file " |
261 << fileName; | 261 << fileName; |
262 return -1; | 262 return -1; |
263 } | 263 } |
264 SetAudioScaling(volumeScaling); | 264 SetAudioScaling(volumeScaling); |
265 } | 265 } |
266 if (SetUpAudioDecoder() == -1) { | 266 if (SetUpAudioDecoder() == -1) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 } | 312 } |
313 | 313 |
314 } else if (_fileFormat == kFileFormatPreencodedFile) { | 314 } else if (_fileFormat == kFileFormatPreencodedFile) { |
315 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, | 315 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, |
316 _fileFormat, codecInst) == -1) { | 316 _fileFormat, codecInst) == -1) { |
317 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " | 317 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " |
318 << "playout."; | 318 << "playout."; |
319 return -1; | 319 return -1; |
320 } | 320 } |
321 } else { | 321 } else { |
322 CodecInst* no_inst = NULL; | 322 CodecInst* no_inst = nullptr; |
323 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, | 323 if (_fileModule.StartPlayingAudioStream(*sourceStream, notification, |
324 _fileFormat, no_inst, startPosition, | 324 _fileFormat, no_inst, startPosition, |
325 stopPosition) == -1) { | 325 stopPosition) == -1) { |
326 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " | 326 LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream " |
327 << "playout."; | 327 << "playout."; |
328 return -1; | 328 return -1; |
329 } | 329 } |
330 } | 330 } |
331 SetAudioScaling(volumeScaling); | 331 SetAudioScaling(volumeScaling); |
332 | 332 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // audio formats | 383 // audio formats |
384 return std::unique_ptr<FilePlayer>( | 384 return std::unique_ptr<FilePlayer>( |
385 new FilePlayerImpl(instanceID, fileFormat)); | 385 new FilePlayerImpl(instanceID, fileFormat)); |
386 default: | 386 default: |
387 assert(false); | 387 assert(false); |
388 return nullptr; | 388 return nullptr; |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 } // namespace webrtc | 392 } // namespace webrtc |
OLD | NEW |