| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "media/audio/audio_io.h" | 7 #include "media/audio/audio_io.h" |
| 8 #include "media/audio/audio_manager.h" | 8 #include "media/audio/audio_manager.h" |
| 9 #include "media/audio/simple_sources.h" | 9 #include "media/audio/simple_sources.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 93 } |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 AudioOutputStream* CreateOutputStream() { | 96 AudioOutputStream* CreateOutputStream() { |
| 97 AudioParameters params; | 97 AudioParameters params; |
| 98 params.Reset(format_, channel_layout_, | 98 params.Reset(format_, channel_layout_, |
| 99 channels_, 0, | 99 channels_, 0, |
| 100 sample_rate_, bits_per_sample_, | 100 sample_rate_, bits_per_sample_, |
| 101 samples_per_packet_); | 101 samples_per_packet_); |
| 102 | 102 |
| 103 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream(params); | 103 AudioOutputStream* aos = audio_man_->MakeAudioOutputStream(params, |
| 104 std::string()); |
| 104 EXPECT_TRUE(aos); | 105 EXPECT_TRUE(aos); |
| 105 return aos; | 106 return aos; |
| 106 } | 107 } |
| 107 | 108 |
| 108 scoped_ptr<AudioManager> audio_man_; | 109 scoped_ptr<AudioManager> audio_man_; |
| 109 | 110 |
| 110 AudioParameters::Format format_; | 111 AudioParameters::Format format_; |
| 111 ChannelLayout channel_layout_; | 112 ChannelLayout channel_layout_; |
| 112 int channels_; | 113 int channels_; |
| 113 int bits_per_sample_; | 114 int bits_per_sample_; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 int non_default_sample_rate = aosw.sample_rate() == 44100 ? | 210 int non_default_sample_rate = aosw.sample_rate() == 44100 ? |
| 210 48000 : 44100; | 211 48000 : 44100; |
| 211 AudioOutputStream* aos = aosw.CreateWithSampleRate(non_default_sample_rate); | 212 AudioOutputStream* aos = aosw.CreateWithSampleRate(non_default_sample_rate); |
| 212 | 213 |
| 213 EXPECT_FALSE(aos->Open()); | 214 EXPECT_FALSE(aos->Open()); |
| 214 | 215 |
| 215 aos->Close(); | 216 aos->Close(); |
| 216 } | 217 } |
| 217 | 218 |
| 218 } // namespace media | 219 } // namespace media |
| OLD | NEW |