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_manager_base.h" | 5 #include "media/audio/audio_manager_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } | 257 } |
258 | 258 |
259 DispatcherParams* dispatcher_params = | 259 DispatcherParams* dispatcher_params = |
260 new DispatcherParams(params, output_params, input_device_id); | 260 new DispatcherParams(params, output_params, input_device_id); |
261 | 261 |
262 AudioOutputDispatchers::iterator it = | 262 AudioOutputDispatchers::iterator it = |
263 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(), | 263 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(), |
264 CompareByParams(dispatcher_params)); | 264 CompareByParams(dispatcher_params)); |
265 if (it != output_dispatchers_.end()) { | 265 if (it != output_dispatchers_.end()) { |
266 delete dispatcher_params; | 266 delete dispatcher_params; |
267 return new AudioOutputProxy((*it)->dispatcher); | 267 return new AudioOutputProxy((*it)->dispatcher.get()); |
268 } | 268 } |
269 | 269 |
270 const base::TimeDelta kCloseDelay = | 270 const base::TimeDelta kCloseDelay = |
271 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); | 271 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); |
272 | 272 |
273 if (output_params.format() != AudioParameters::AUDIO_FAKE) { | 273 if (output_params.format() != AudioParameters::AUDIO_FAKE) { |
274 scoped_refptr<AudioOutputDispatcher> dispatcher = | 274 scoped_refptr<AudioOutputDispatcher> dispatcher = |
275 new AudioOutputResampler(this, params, output_params, input_device_id, | 275 new AudioOutputResampler(this, params, output_params, input_device_id, |
276 kCloseDelay); | 276 kCloseDelay); |
277 dispatcher_params->dispatcher = dispatcher; | 277 dispatcher_params->dispatcher = dispatcher; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 return GetPreferredOutputStreamParameters(AudioParameters()); | 385 return GetPreferredOutputStreamParameters(AudioParameters()); |
386 } | 386 } |
387 | 387 |
388 AudioParameters AudioManagerBase::GetInputStreamParameters( | 388 AudioParameters AudioManagerBase::GetInputStreamParameters( |
389 const std::string& device_id) { | 389 const std::string& device_id) { |
390 NOTREACHED(); | 390 NOTREACHED(); |
391 return AudioParameters(); | 391 return AudioParameters(); |
392 } | 392 } |
393 | 393 |
394 } // namespace media | 394 } // namespace media |
OLD | NEW |