| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |