Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Side by Side Diff: media/audio/audio_output_device_unittest.cc

Issue 518433002: Revert of Revert of Remove the last piece of deprecated synchronous IO code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_output_device.h ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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.
OLDNEW
« no previous file with comments | « media/audio/audio_output_device.h ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698