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/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "media/audio/audio_output_dispatcher.h" | 10 #include "media/audio/audio_output_dispatcher.h" |
11 #include "media/audio/audio_output_proxy.h" | 11 #include "media/audio/audio_output_proxy.h" |
12 #include "media/audio/fake_audio_input_stream.h" | 12 #include "media/audio/fake_audio_input_stream.h" |
13 #include "media/audio/fake_audio_output_stream.h" | 13 #include "media/audio/fake_audio_output_stream.h" |
14 | 14 |
15 namespace media { | |
16 | |
17 static const int kStreamCloseDelaySeconds = 5; | 15 static const int kStreamCloseDelaySeconds = 5; |
18 | 16 |
19 // Default maximum number of output streams that can be open simultaneously | 17 // Default maximum number of output streams that can be open simultaneously |
20 // for all platforms. | 18 // for all platforms. |
21 static const int kDefaultMaxOutputStreams = 16; | 19 static const int kDefaultMaxOutputStreams = 16; |
22 | 20 |
23 // Default maximum number of input streams that can be open simultaneously | 21 // Default maximum number of input streams that can be open simultaneously |
24 // for all platforms. | 22 // for all platforms. |
25 static const int kDefaultMaxInputStreams = 16; | 23 static const int kDefaultMaxInputStreams = 16; |
26 | 24 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // both physical audio stream objects that belong to the dispatcher as | 219 // both physical audio stream objects that belong to the dispatcher as |
222 // well as the message loop of the audio thread that will soon go away. | 220 // well as the message loop of the audio thread that will soon go away. |
223 // So, better crash now than later. | 221 // So, better crash now than later. |
224 CHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive"; | 222 CHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive"; |
225 dispatcher = NULL; | 223 dispatcher = NULL; |
226 } | 224 } |
227 } | 225 } |
228 | 226 |
229 output_dispatchers_.clear(); | 227 output_dispatchers_.clear(); |
230 } | 228 } |
231 | |
232 } // namespace media | |
OLD | NEW |