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

Side by Side Diff: media/audio/win/audio_low_latency_output_win_unittest.cc

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <windows.h> 5 #include <windows.h>
6 #include <mmsystem.h> 6 #include <mmsystem.h>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Creates an array that will store delta times between callbacks. 86 // Creates an array that will store delta times between callbacks.
87 // The content of this array will be written to a text file at 87 // The content of this array will be written to a text file at
88 // destruction and can then be used for off-line analysis of the exact 88 // destruction and can then be used for off-line analysis of the exact
89 // timing of callbacks. The text file will be stored in media/test/data. 89 // timing of callbacks. The text file will be stored in media/test/data.
90 delta_times_.reset(new int[kMaxDeltaSamples]); 90 delta_times_.reset(new int[kMaxDeltaSamples]);
91 } 91 }
92 92
93 virtual ~ReadFromFileAudioSource() { 93 virtual ~ReadFromFileAudioSource() {
94 // Get complete file path to output file in directory containing 94 // Get complete file path to output file in directory containing
95 // media_unittests.exe. 95 // media_unittests.exe.
96 FilePath file_name; 96 base::FilePath file_name;
97 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name)); 97 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name));
98 file_name = file_name.AppendASCII(kDeltaTimeMsFileName); 98 file_name = file_name.AppendASCII(kDeltaTimeMsFileName);
99 99
100 EXPECT_TRUE(!text_file_); 100 EXPECT_TRUE(!text_file_);
101 text_file_ = file_util::OpenFile(file_name, "wt"); 101 text_file_ = file_util::OpenFile(file_name, "wt");
102 DLOG_IF(ERROR, !text_file_) << "Failed to open log file."; 102 DLOG_IF(ERROR, !text_file_) << "Failed to open log file.";
103 103
104 // Write the array which contains delta times to a text file. 104 // Write the array which contains delta times to a text file.
105 size_t elements_written = 0; 105 size_t elements_written = 0;
106 while (elements_written < elements_to_write_) { 106 while (elements_written < elements_to_write_) {
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 aos->Start(&source); 693 aos->Start(&source);
694 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), 694 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(),
695 TestTimeouts::action_timeout()); 695 TestTimeouts::action_timeout());
696 loop.Run(); 696 loop.Run();
697 aos->Stop(); 697 aos->Stop();
698 aos->Close(); 698 aos->Close();
699 } 699 }
700 700
701 } // namespace media 701 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win_unittest.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698