| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <memory> | 6 #include <memory> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 mixers_[idx].reset(new AudioRendererMixer(audio_parameters_, sink)); | 73 mixers_[idx].reset(new AudioRendererMixer(audio_parameters_, sink)); |
| 74 } | 74 } |
| 75 EXPECT_CALL(*this, RemoveMixer(testing::_, device_id, testing::_)); | 75 EXPECT_CALL(*this, RemoveMixer(testing::_, device_id, testing::_)); |
| 76 | 76 |
| 77 if (device_status) | 77 if (device_status) |
| 78 *device_status = OUTPUT_DEVICE_STATUS_OK; | 78 *device_status = OUTPUT_DEVICE_STATUS_OK; |
| 79 return mixers_[idx].get(); | 79 return mixers_[idx].get(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 double ProvideInput() { | 82 double ProvideInput() { |
| 83 return mixer_input_->ProvideInput(audio_bus_.get(), base::TimeDelta()); | 83 return mixer_input_->ProvideInput(audio_bus_.get(), 0); |
| 84 } | 84 } |
| 85 | 85 |
| 86 MOCK_METHOD3(RemoveMixer, | 86 MOCK_METHOD3(RemoveMixer, |
| 87 void(const AudioParameters&, | 87 void(const AudioParameters&, |
| 88 const std::string&, | 88 const std::string&, |
| 89 const url::Origin&)); | 89 const url::Origin&)); |
| 90 | 90 |
| 91 MOCK_METHOD1(SwitchCallbackCalled, void(OutputDeviceStatus)); | 91 MOCK_METHOD1(SwitchCallbackCalled, void(OutputDeviceStatus)); |
| 92 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { | 92 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { |
| 93 SwitchCallbackCalled(result); | 93 SwitchCallbackCalled(result); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 EXPECT_CALL(*this, SwitchCallbackCalled(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL)); | 271 EXPECT_CALL(*this, SwitchCallbackCalled(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL)); |
| 272 mixer_input_->SwitchOutputDevice( | 272 mixer_input_->SwitchOutputDevice( |
| 273 kDefaultDeviceId, url::Origin(), | 273 kDefaultDeviceId, url::Origin(), |
| 274 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, | 274 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, |
| 275 base::Unretained(this), &run_loop)); | 275 base::Unretained(this), &run_loop)); |
| 276 mixer_input_->Stop(); | 276 mixer_input_->Stop(); |
| 277 run_loop.Run(); | 277 run_loop.Run(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace media | 280 } // namespace media |
| OLD | NEW |