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 "media/audio/audio_output_dispatcher_impl.h" | 5 #include "media/audio/audio_output_dispatcher_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/time.h" | 12 #include "base/time/time.h" |
13 #include "media/audio/audio_io.h" | 13 #include "media/audio/audio_io.h" |
14 #include "media/audio/audio_output_proxy.h" | 14 #include "media/audio/audio_output_proxy.h" |
15 #include "media/audio/audio_util.h" | 15 #include "media/audio/audio_util.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 AudioOutputDispatcherImpl::AudioOutputDispatcherImpl( | 19 AudioOutputDispatcherImpl::AudioOutputDispatcherImpl( |
20 AudioManager* audio_manager, | 20 AudioManager* audio_manager, |
21 const AudioParameters& params, | 21 const AudioParameters& params, |
22 const std::string& input_device_id, | 22 const std::string& input_device_id, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // This method is called by |close_timer_|. | 195 // This method is called by |close_timer_|. |
196 void AudioOutputDispatcherImpl::ClosePendingStreams() { | 196 void AudioOutputDispatcherImpl::ClosePendingStreams() { |
197 DCHECK_EQ(base::MessageLoop::current(), message_loop_); | 197 DCHECK_EQ(base::MessageLoop::current(), message_loop_); |
198 while (!idle_streams_.empty()) { | 198 while (!idle_streams_.empty()) { |
199 idle_streams_.back()->Close(); | 199 idle_streams_.back()->Close(); |
200 idle_streams_.pop_back(); | 200 idle_streams_.pop_back(); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 } // namespace media | 204 } // namespace media |
OLD | NEW |