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

Side by Side Diff: webrtc/modules/audio_processing/transient/click_annotate.cc

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 22 matching lines...) Expand all
33 printf("%s PCMfile DATfile chunkSize sampleRate\n\n", argv[0]); 33 printf("%s PCMfile DATfile chunkSize sampleRate\n\n", argv[0]);
34 printf("Opens the PCMfile with sampleRate in Hertz.\n"); 34 printf("Opens the PCMfile with sampleRate in Hertz.\n");
35 printf("Creates a send times array, one for each chunkSize "); 35 printf("Creates a send times array, one for each chunkSize ");
36 printf("milliseconds step.\n"); 36 printf("milliseconds step.\n");
37 printf("Each block that contains a transient, has an infinite send time. "); 37 printf("Each block that contains a transient, has an infinite send time. ");
38 printf("The resultant array is written to a DATfile.\n\n"); 38 printf("The resultant array is written to a DATfile.\n\n");
39 return 0; 39 return 0;
40 } 40 }
41 41
42 std::unique_ptr<FileWrapper> pcm_file(FileWrapper::Create()); 42 std::unique_ptr<FileWrapper> pcm_file(FileWrapper::Create());
43 pcm_file->OpenFile(argv[1], true, false, false); 43 pcm_file->OpenFile(argv[1], true);
44 if (!pcm_file->Open()) { 44 if (!pcm_file->is_open()) {
45 printf("\nThe %s could not be opened.\n\n", argv[1]); 45 printf("\nThe %s could not be opened.\n\n", argv[1]);
46 return -1; 46 return -1;
47 } 47 }
48 48
49 std::unique_ptr<FileWrapper> dat_file(FileWrapper::Create()); 49 std::unique_ptr<FileWrapper> dat_file(FileWrapper::Create());
50 dat_file->OpenFile(argv[2], false, false, false); 50 dat_file->OpenFile(argv[2], false);
51 if (!dat_file->Open()) { 51 if (!dat_file->is_open()) {
52 printf("\nThe %s could not be opened.\n\n", argv[2]); 52 printf("\nThe %s could not be opened.\n\n", argv[2]);
53 return -1; 53 return -1;
54 } 54 }
55 55
56 int chunk_size_ms = atoi(argv[3]); 56 int chunk_size_ms = atoi(argv[3]);
57 if (chunk_size_ms <= 0) { 57 if (chunk_size_ms <= 0) {
58 printf("\nThe chunkSize must be a positive integer\n\n"); 58 printf("\nThe chunkSize must be a positive integer\n\n");
59 return -1; 59 return -1;
60 } 60 }
61 61
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (floats_written == 0) { 104 if (floats_written == 0) {
105 printf("\nThe send times could not be written to DAT file\n\n"); 105 printf("\nThe send times could not be written to DAT file\n\n");
106 return -1; 106 return -1;
107 } 107 }
108 108
109 pcm_file->CloseFile(); 109 pcm_file->CloseFile();
110 dat_file->CloseFile(); 110 dat_file->CloseFile();
111 111
112 return lost_packets; 112 return lost_packets;
113 } 113 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/transient/file_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698