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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "media/audio/audio_manager.h" | 9 #include "media/audio/audio_manager.h" |
10 #include "media/audio/audio_manager_base.h" | 10 #include "media/audio/audio_manager_base.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 const AudioParameters& params, const std::string& device_id)); | 117 const AudioParameters& params, const std::string& device_id)); |
118 MOCK_METHOD2(GetPreferredOutputStreamParameters, AudioParameters( | 118 MOCK_METHOD2(GetPreferredOutputStreamParameters, AudioParameters( |
119 const std::string& device_id, const AudioParameters& params)); | 119 const std::string& device_id, const AudioParameters& params)); |
120 | 120 |
121 private: | 121 private: |
122 media::FakeAudioLogFactory fake_audio_log_factory_; | 122 media::FakeAudioLogFactory fake_audio_log_factory_; |
123 }; | 123 }; |
124 | 124 |
125 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 125 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
126 public: | 126 public: |
127 int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) { | 127 int OnMoreData(AudioBus* audio_bus, |
| 128 uint32_t total_bytes_delay, |
| 129 uint32_t frames_skipped) { |
128 audio_bus->Zero(); | 130 audio_bus->Zero(); |
129 return audio_bus->frames(); | 131 return audio_bus->frames(); |
130 } | 132 } |
131 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); | 133 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); |
132 }; | 134 }; |
133 | 135 |
134 } // namespace | 136 } // namespace |
135 | 137 |
136 namespace media { | 138 namespace media { |
137 | 139 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 _)).WillOnce(Return(&real_stream)); | 723 _)).WillOnce(Return(&real_stream)); |
722 | 724 |
723 // Stream1 should be able to successfully open and start. | 725 // Stream1 should be able to successfully open and start. |
724 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); | 726 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); |
725 proxy = new AudioOutputProxy(resampler_.get()); | 727 proxy = new AudioOutputProxy(resampler_.get()); |
726 EXPECT_TRUE(proxy->Open()); | 728 EXPECT_TRUE(proxy->Open()); |
727 CloseAndWaitForCloseTimer(proxy, &real_stream); | 729 CloseAndWaitForCloseTimer(proxy, &real_stream); |
728 } | 730 } |
729 | 731 |
730 } // namespace media | 732 } // namespace media |
OLD | NEW |