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/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "media/audio/audio_io.h" | |
14 #include "media/audio/audio_output_proxy.h" | 13 #include "media/audio/audio_output_proxy.h" |
15 | 14 |
16 namespace media { | 15 namespace media { |
17 | 16 |
18 AudioOutputDispatcherImpl::AudioOutputDispatcherImpl( | 17 AudioOutputDispatcherImpl::AudioOutputDispatcherImpl( |
19 AudioManager* audio_manager, | 18 AudioManager* audio_manager, |
20 const AudioParameters& params, | 19 const AudioParameters& params, |
21 const std::string& output_device_id, | 20 const std::string& output_device_id, |
22 const base::TimeDelta& close_delay) | 21 const base::TimeDelta& close_delay) |
23 : AudioOutputDispatcher(audio_manager, | 22 : AudioOutputDispatcher(audio_manager, |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 169 |
171 AudioStreamIDMap::iterator it = audio_stream_ids_.find(stream); | 170 AudioStreamIDMap::iterator it = audio_stream_ids_.find(stream); |
172 DCHECK(it != audio_stream_ids_.end()); | 171 DCHECK(it != audio_stream_ids_.end()); |
173 audio_log_->OnClosed(it->second); | 172 audio_log_->OnClosed(it->second); |
174 audio_stream_ids_.erase(it); | 173 audio_stream_ids_.erase(it); |
175 } | 174 } |
176 idle_streams_.erase(idle_streams_.begin() + keep_alive, idle_streams_.end()); | 175 idle_streams_.erase(idle_streams_.begin() + keep_alive, idle_streams_.end()); |
177 } | 176 } |
178 | 177 |
179 } // namespace media | 178 } // namespace media |
OLD | NEW |