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

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

Issue 9965076: Revert 130180 - Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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_dispatcher.h ('k') | media/audio/audio_output_proxy.h » ('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 "media/audio/audio_output_dispatcher.h" 5 #include "media/audio/audio_output_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "media/audio/audio_io.h" 11 #include "media/audio/audio_io.h"
12 12
13 namespace media {
14
15 AudioOutputDispatcher::AudioOutputDispatcher( 13 AudioOutputDispatcher::AudioOutputDispatcher(
16 AudioManager* audio_manager, const AudioParameters& params, 14 AudioManager* audio_manager, const AudioParameters& params,
17 base::TimeDelta close_delay) 15 base::TimeDelta close_delay)
18 : audio_manager_(audio_manager), 16 : audio_manager_(audio_manager),
19 message_loop_(MessageLoop::current()), 17 message_loop_(MessageLoop::current()),
20 params_(params), 18 params_(params),
21 pause_delay_(base::TimeDelta::FromMilliseconds( 19 pause_delay_(base::TimeDelta::FromMilliseconds(
22 2 * params.frames_per_buffer() * 20 2 * params.frames_per_buffer() *
23 base::Time::kMillisecondsPerSecond / params.sample_rate())), 21 base::Time::kMillisecondsPerSecond / params.sample_rate())),
24 paused_proxies_(0), 22 paused_proxies_(0),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 161
164 // This method is called by |close_timer_|. 162 // This method is called by |close_timer_|.
165 void AudioOutputDispatcher::ClosePendingStreams() { 163 void AudioOutputDispatcher::ClosePendingStreams() {
166 DCHECK_EQ(MessageLoop::current(), message_loop_); 164 DCHECK_EQ(MessageLoop::current(), message_loop_);
167 165
168 while (!idle_streams_.empty()) { 166 while (!idle_streams_.empty()) {
169 idle_streams_.back()->Close(); 167 idle_streams_.back()->Close();
170 idle_streams_.pop_back(); 168 idle_streams_.pop_back();
171 } 169 }
172 } 170 }
173
174 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_dispatcher.h ('k') | media/audio/audio_output_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698