| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { | 117 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { |
| 118 SwitchCallbackCalled(result); | 118 SwitchCallbackCalled(result); |
| 119 loop->Quit(); | 119 loop->Quit(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 AudioRendererMixer* GetInputMixer() { return mixer_input_->mixer_; } | 122 AudioRendererMixer* GetInputMixer() { return mixer_input_->mixer_; } |
| 123 | 123 |
| 124 protected: | 124 protected: |
| 125 virtual ~AudioRendererMixerInputTest() {} | 125 virtual ~AudioRendererMixerInputTest() {} |
| 126 | 126 |
| 127 base::MessageLoop message_loop_; |
| 127 AudioParameters audio_parameters_; | 128 AudioParameters audio_parameters_; |
| 128 scoped_refptr<MockAudioRendererSink> sinks_[2]; | 129 scoped_refptr<MockAudioRendererSink> sinks_[2]; |
| 129 std::unique_ptr<AudioRendererMixer> mixers_[2]; | 130 std::unique_ptr<AudioRendererMixer> mixers_[2]; |
| 130 scoped_refptr<AudioRendererMixerInput> mixer_input_; | 131 scoped_refptr<AudioRendererMixerInput> mixer_input_; |
| 131 std::unique_ptr<FakeAudioRenderCallback> fake_callback_; | 132 std::unique_ptr<FakeAudioRenderCallback> fake_callback_; |
| 132 std::unique_ptr<AudioBus> audio_bus_; | 133 std::unique_ptr<AudioBus> audio_bus_; |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInputTest); | 136 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInputTest); |
| 136 }; | 137 }; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, | 397 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, |
| 397 base::Unretained(this), &run_loop)); | 398 base::Unretained(this), &run_loop)); |
| 398 run_loop.Run(); | 399 run_loop.Run(); |
| 399 | 400 |
| 400 mixer_input_->Initialize(audio_parameters_, fake_callback_.get()); | 401 mixer_input_->Initialize(audio_parameters_, fake_callback_.get()); |
| 401 mixer_input_->Start(); | 402 mixer_input_->Start(); |
| 402 mixer_input_->Stop(); | 403 mixer_input_->Stop(); |
| 403 } | 404 } |
| 404 | 405 |
| 405 } // namespace media | 406 } // namespace media |
| OLD | NEW |