| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 int AudioOutputDeviceTest::CalculateMemorySize() { | 121 int AudioOutputDeviceTest::CalculateMemorySize() { |
| 122 // Calculate output memory size. | 122 // Calculate output memory size. |
| 123 return AudioBus::CalculateMemorySize(default_audio_parameters_); | 123 return AudioBus::CalculateMemorySize(default_audio_parameters_); |
| 124 } | 124 } |
| 125 | 125 |
| 126 AudioOutputDeviceTest::AudioOutputDeviceTest() { | 126 AudioOutputDeviceTest::AudioOutputDeviceTest() { |
| 127 default_audio_parameters_.Reset( | 127 default_audio_parameters_.Reset( |
| 128 AudioParameters::AUDIO_PCM_LINEAR, | 128 AudioParameters::AUDIO_PCM_LINEAR, |
| 129 CHANNEL_LAYOUT_STEREO, 2, 0, 48000, 16, 1024); | 129 CHANNEL_LAYOUT_STEREO, 2, 48000, 16, 1024); |
| 130 | 130 |
| 131 audio_output_ipc_ = new MockAudioOutputIPC(); | 131 audio_output_ipc_ = new MockAudioOutputIPC(); |
| 132 audio_device_ = new AudioOutputDevice( | 132 audio_device_ = new AudioOutputDevice( |
| 133 scoped_ptr<AudioOutputIPC>(audio_output_ipc_), | 133 scoped_ptr<AudioOutputIPC>(audio_output_ipc_), |
| 134 io_loop_.message_loop_proxy()); | 134 io_loop_.message_loop_proxy()); |
| 135 | 135 |
| 136 audio_device_->Initialize(default_audio_parameters_, | 136 audio_device_->Initialize(default_audio_parameters_, |
| 137 &callback_); | 137 &callback_); |
| 138 | 138 |
| 139 io_loop_.RunUntilIdle(); | 139 io_loop_.RunUntilIdle(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 StartAudioDevice(); | 253 StartAudioDevice(); |
| 254 ExpectRenderCallback(); | 254 ExpectRenderCallback(); |
| 255 CreateStream(); | 255 CreateStream(); |
| 256 WaitUntilRenderCallback(); | 256 WaitUntilRenderCallback(); |
| 257 StopAudioDevice(); | 257 StopAudioDevice(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); | 260 INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false)); |
| 261 | 261 |
| 262 } // namespace media. | 262 } // namespace media. |
| OLD | NEW |