| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 const std::string& device_id, const AudioParameters& params)); | 136 const std::string& device_id, const AudioParameters& params)); |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 media::FakeAudioLogFactory fake_audio_log_factory_; | 139 media::FakeAudioLogFactory fake_audio_log_factory_; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 142 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
| 143 public: | 143 public: |
| 144 int OnMoreData(AudioBus* audio_bus, | 144 int OnMoreData(AudioBus* audio_bus, |
| 145 uint32_t total_bytes_delay, | 145 uint32_t total_bytes_delay, |
| 146 uint32_t frames_skipped) { | 146 uint32_t frames_skipped, |
| 147 const media::AudioTimestamp& output_timestamp) { |
| 147 audio_bus->Zero(); | 148 audio_bus->Zero(); |
| 148 return audio_bus->frames(); | 149 return audio_bus->frames(); |
| 149 } | 150 } |
| 150 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); | 151 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); |
| 151 }; | 152 }; |
| 152 | 153 |
| 153 } // namespace | 154 } // namespace |
| 154 | 155 |
| 155 namespace media { | 156 namespace media { |
| 156 | 157 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 .WillOnce(Return(&real_stream)); | 741 .WillOnce(Return(&real_stream)); |
| 741 | 742 |
| 742 // Stream1 should be able to successfully open and start. | 743 // Stream1 should be able to successfully open and start. |
| 743 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); | 744 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); |
| 744 proxy = new AudioOutputProxy(resampler_.get()); | 745 proxy = new AudioOutputProxy(resampler_.get()); |
| 745 EXPECT_TRUE(proxy->Open()); | 746 EXPECT_TRUE(proxy->Open()); |
| 746 CloseAndWaitForCloseTimer(proxy, &real_stream); | 747 CloseAndWaitForCloseTimer(proxy, &real_stream); |
| 747 } | 748 } |
| 748 | 749 |
| 749 } // namespace media | 750 } // namespace media |
| OLD | NEW |