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