| 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 "media/audio/win/audio_low_latency_output_win.h" | 5 #include "media/audio/win/audio_low_latency_output_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <mmsystem.h> | 8 #include <mmsystem.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 int channels() const { return ChannelLayoutToChannelCount(channel_layout_); } | 202 int channels() const { return ChannelLayoutToChannelCount(channel_layout_); } |
| 203 int bits_per_sample() const { return bits_per_sample_; } | 203 int bits_per_sample() const { return bits_per_sample_; } |
| 204 int sample_rate() const { return sample_rate_; } | 204 int sample_rate() const { return sample_rate_; } |
| 205 int samples_per_packet() const { return samples_per_packet_; } | 205 int samples_per_packet() const { return samples_per_packet_; } |
| 206 | 206 |
| 207 private: | 207 private: |
| 208 AudioOutputStream* CreateOutputStream() { | 208 AudioOutputStream* CreateOutputStream() { |
| 209 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream( | 209 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream( |
| 210 AudioParameters(format_, channel_layout_, sample_rate_, | 210 AudioParameters(format_, channel_layout_, sample_rate_, |
| 211 bits_per_sample_, samples_per_packet_), | 211 bits_per_sample_, samples_per_packet_), |
| 212 std::string(), AudioManager::LogCallback()); | 212 std::string()); |
| 213 EXPECT_TRUE(aos); | 213 EXPECT_TRUE(aos); |
| 214 return aos; | 214 return aos; |
| 215 } | 215 } |
| 216 | 216 |
| 217 AudioManager* audio_man_; | 217 AudioManager* audio_man_; |
| 218 AudioParameters::Format format_; | 218 AudioParameters::Format format_; |
| 219 ChannelLayout channel_layout_; | 219 ChannelLayout channel_layout_; |
| 220 int bits_per_sample_; | 220 int bits_per_sample_; |
| 221 int sample_rate_; | 221 int sample_rate_; |
| 222 int samples_per_packet_; | 222 int samples_per_packet_; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 aos->Start(&source); | 625 aos->Start(&source); |
| 626 message_loop_.PostDelayedTask(FROM_HERE, | 626 message_loop_.PostDelayedTask(FROM_HERE, |
| 627 base::MessageLoop::QuitWhenIdleClosure(), | 627 base::MessageLoop::QuitWhenIdleClosure(), |
| 628 TestTimeouts::action_timeout()); | 628 TestTimeouts::action_timeout()); |
| 629 message_loop_.Run(); | 629 message_loop_.Run(); |
| 630 aos->Stop(); | 630 aos->Stop(); |
| 631 aos->Close(); | 631 aos->Close(); |
| 632 } | 632 } |
| 633 | 633 |
| 634 } // namespace media | 634 } // namespace media |
| OLD | NEW |