| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 364     } | 364     } | 
| 365 | 365 | 
| 366     FileWrapper* inputStream = FileWrapper::Create(); | 366     FileWrapper* inputStream = FileWrapper::Create(); | 
| 367     if(inputStream == NULL) | 367     if(inputStream == NULL) | 
| 368     { | 368     { | 
| 369        WEBRTC_TRACE(kTraceMemory, kTraceFile, _id, | 369        WEBRTC_TRACE(kTraceMemory, kTraceFile, _id, | 
| 370                     "Failed to allocate input stream for file %s", fileName); | 370                     "Failed to allocate input stream for file %s", fileName); | 
| 371         return -1; | 371         return -1; | 
| 372     } | 372     } | 
| 373 | 373 | 
| 374     if(inputStream->OpenFile(fileName, true, loop) != 0) | 374     if (inputStream->OpenFile(fileName, true) != 0) { | 
| 375     { | 375       delete inputStream; | 
| 376         delete inputStream; | 376       WEBRTC_TRACE(kTraceError, kTraceFile, _id, "Could not open input file %s", | 
| 377         WEBRTC_TRACE(kTraceError, kTraceFile, _id, | 377                    fileName); | 
| 378                      "Could not open input file %s", fileName); | 378       return -1; | 
| 379         return -1; |  | 
| 380     } | 379     } | 
| 381 | 380 | 
| 382     if(StartPlayingStream(*inputStream, loop, notificationTimeMs, | 381     if(StartPlayingStream(*inputStream, loop, notificationTimeMs, | 
| 383                           format, codecInst, startPointMs, stopPointMs) == -1) | 382                           format, codecInst, startPointMs, stopPointMs) == -1) | 
| 384     { | 383     { | 
| 385         inputStream->CloseFile(); | 384         inputStream->CloseFile(); | 
| 386         delete inputStream; | 385         delete inputStream; | 
| 387         return -1; | 386         return -1; | 
| 388     } | 387     } | 
| 389 | 388 | 
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1126 { | 1125 { | 
| 1127     if((frequency == 8000) || (frequency == 16000)|| (frequency == 32000)) | 1126     if((frequency == 8000) || (frequency == 16000)|| (frequency == 32000)) | 
| 1128     { | 1127     { | 
| 1129         return true; | 1128         return true; | 
| 1130     } | 1129     } | 
| 1131     WEBRTC_TRACE(kTraceError, kTraceFile, -1, | 1130     WEBRTC_TRACE(kTraceError, kTraceFile, -1, | 
| 1132                  "Frequency should be 8000, 16000 or 32000 (Hz)"); | 1131                  "Frequency should be 8000, 16000 or 32000 (Hz)"); | 
| 1133     return false; | 1132     return false; | 
| 1134 } | 1133 } | 
| 1135 }  // namespace webrtc | 1134 }  // namespace webrtc | 
| OLD | NEW | 
|---|