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

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

Issue 9805001: 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
13 AudioOutputDispatcher::AudioOutputDispatcher( 15 AudioOutputDispatcher::AudioOutputDispatcher(
14 AudioManager* audio_manager, const AudioParameters& params, 16 AudioManager* audio_manager, const AudioParameters& params,
15 base::TimeDelta close_delay) 17 base::TimeDelta close_delay)
16 : audio_manager_(audio_manager), 18 : audio_manager_(audio_manager),
17 message_loop_(MessageLoop::current()), 19 message_loop_(MessageLoop::current()),
18 params_(params), 20 params_(params),
19 pause_delay_(base::TimeDelta::FromMilliseconds( 21 pause_delay_(base::TimeDelta::FromMilliseconds(
20 2 * params.frames_per_buffer() * 22 2 * params.frames_per_buffer() *
21 base::Time::kMillisecondsPerSecond / params.sample_rate())), 23 base::Time::kMillisecondsPerSecond / params.sample_rate())),
22 paused_proxies_(0), 24 paused_proxies_(0),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 163
162 // This method is called by |close_timer_|. 164 // This method is called by |close_timer_|.
163 void AudioOutputDispatcher::ClosePendingStreams() { 165 void AudioOutputDispatcher::ClosePendingStreams() {
164 DCHECK_EQ(MessageLoop::current(), message_loop_); 166 DCHECK_EQ(MessageLoop::current(), message_loop_);
165 167
166 while (!idle_streams_.empty()) { 168 while (!idle_streams_.empty()) {
167 idle_streams_.back()->Close(); 169 idle_streams_.back()->Close();
168 idle_streams_.pop_back(); 170 idle_streams_.pop_back();
169 } 171 }
170 } 172 }
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