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

Side by Side Diff: media/tools/wav_ola_test/wav_ola_test.cc

Issue 7352006: Rename CommandLine::GetArgs(), update callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename CommandLine::GetArgs(), update callers. Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | remoting/protocol/protocol_test_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This application is a test for AudioRendererAlgorithmOLA. It reads in a 5 // This application is a test for AudioRendererAlgorithmOLA. It reads in a
6 // specified wav file (so far only 8, 16 and 32 bit are supported) and uses 6 // specified wav file (so far only 8, 16 and 32 bit are supported) and uses
7 // ARAO to scale the playback by a specified rate. Then it outputs the result 7 // ARAO to scale the playback by a specified rate. Then it outputs the result
8 // to the specified location. Command line calls should be as follows: 8 // to the specified location. Command line calls should be as follows:
9 // 9 //
10 // wav_ola_test RATE INFILE OUTFILE 10 // wav_ola_test RATE INFILE OUTFILE
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 size_t window_size_; 66 size_t window_size_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(Dummy); 68 DISALLOW_COPY_AND_ASSIGN(Dummy);
69 }; 69 };
70 70
71 int main(int argc, const char** argv) { 71 int main(int argc, const char** argv) {
72 AudioRendererAlgorithmOLA ola; 72 AudioRendererAlgorithmOLA ola;
73 CommandLine::Init(argc, argv); 73 CommandLine::Init(argc, argv);
74 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 74 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
75 75
76 const std::vector<CommandLine::StringType>& filenames = cmd_line->args(); 76 const CommandLine::StringVector& filenames = cmd_line->GetArgs();
77 if (filenames.empty()) { 77 if (filenames.empty()) {
78 std::cerr << "Usage: " << argv[0] << " RATE INFILE OUTFILE\n" 78 std::cerr << "Usage: " << argv[0] << " RATE INFILE OUTFILE\n"
79 << std::endl; 79 << std::endl;
80 return 1; 80 return 1;
81 } 81 }
82 82
83 // Retrieve command line options. 83 // Retrieve command line options.
84 FilePath in_path(filenames[1]); 84 FilePath in_path(filenames[1]);
85 FilePath out_path(filenames[2]); 85 FilePath out_path(filenames[2]);
86 double playback_rate = 0.0; 86 double playback_rate = 0.0;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 wav.subchunk1_size = 16; 166 wav.subchunk1_size = 16;
167 wav.subchunk2_size = bytes_written; 167 wav.subchunk2_size = bytes_written;
168 fseek(output.get(), 0, SEEK_SET); 168 fseek(output.get(), 0, SEEK_SET);
169 if (fwrite(&wav, sizeof(wav), 1, output.get()) < 1) { 169 if (fwrite(&wav, sizeof(wav), 1, output.get()) < 1) {
170 LOG(ERROR) << "could not write wav header."; 170 LOG(ERROR) << "could not write wav header.";
171 return 1; 171 return 1;
172 } 172 }
173 CommandLine::Reset(); 173 CommandLine::Reset();
174 return 0; 174 return 0;
175 } 175 }
OLDNEW
« no previous file with comments | « media/tools/scaler_bench/scaler_bench.cc ('k') | remoting/protocol/protocol_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698