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

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

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 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
« no previous file with comments | « media/audio/sounds/audio_stream_handler.cc ('k') | media/audio/win/audio_manager_win.h » ('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) 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 int channels() const { return ChannelLayoutToChannelCount(channel_layout_); } 217 int channels() const { return ChannelLayoutToChannelCount(channel_layout_); }
218 int bits_per_sample() const { return bits_per_sample_; } 218 int bits_per_sample() const { return bits_per_sample_; }
219 int sample_rate() const { return sample_rate_; } 219 int sample_rate() const { return sample_rate_; }
220 int samples_per_packet() const { return samples_per_packet_; } 220 int samples_per_packet() const { return samples_per_packet_; }
221 221
222 private: 222 private:
223 AudioOutputStream* CreateOutputStream() { 223 AudioOutputStream* CreateOutputStream() {
224 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream( 224 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream(
225 AudioParameters(format_, channel_layout_, sample_rate_, 225 AudioParameters(format_, channel_layout_, sample_rate_,
226 bits_per_sample_, samples_per_packet_), 226 bits_per_sample_, samples_per_packet_),
227 std::string(), std::string()); 227 std::string());
228 EXPECT_TRUE(aos); 228 EXPECT_TRUE(aos);
229 return aos; 229 return aos;
230 } 230 }
231 231
232 AudioManager* audio_man_; 232 AudioManager* audio_man_;
233 AudioParameters::Format format_; 233 AudioParameters::Format format_;
234 ChannelLayout channel_layout_; 234 ChannelLayout channel_layout_;
235 int bits_per_sample_; 235 int bits_per_sample_;
236 int sample_rate_; 236 int sample_rate_;
237 int samples_per_packet_; 237 int samples_per_packet_;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 aos->Start(&source); 664 aos->Start(&source);
665 loop.PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), 665 loop.PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
666 TestTimeouts::action_timeout()); 666 TestTimeouts::action_timeout());
667 loop.Run(); 667 loop.Run();
668 aos->Stop(); 668 aos->Stop();
669 aos->Close(); 669 aos->Close();
670 } 670 }
671 671
672 } // namespace media 672 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/sounds/audio_stream_handler.cc ('k') | media/audio/win/audio_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698