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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/environment.h" | 6 #include "base/environment.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
11 #include "base/test/test_timeouts.h" | 11 #include "base/test/test_timeouts.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "media/audio/audio_io.h" | 14 #include "media/audio/audio_io.h" |
15 #include "media/audio/audio_manager_base.h" | 15 #include "media/audio/audio_manager_base.h" |
16 #include "media/audio/fake_audio_log_factory.h" | 16 #include "media/audio/fake_audio_log_factory.h" |
17 #include "media/base/seekable_buffer.h" | 17 #include "media/base/seekable_buffer.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 #if defined(USE_ALSA) | 21 #if defined(USE_PULSEAUDIO) |
| 22 #include "media/audio/pulse/audio_manager_pulse.h" |
| 23 #elif defined(USE_ALSA) |
22 #include "media/audio/alsa/audio_manager_alsa.h" | 24 #include "media/audio/alsa/audio_manager_alsa.h" |
| 25 #elif defined(USE_CRAS) |
| 26 #include "media/audio/cras/audio_manager_cras.h" |
23 #elif defined(OS_MACOSX) | 27 #elif defined(OS_MACOSX) |
24 #include "media/audio/mac/audio_manager_mac.h" | 28 #include "media/audio/mac/audio_manager_mac.h" |
25 #elif defined(OS_WIN) | 29 #elif defined(OS_WIN) |
26 #include "media/audio/win/audio_manager_win.h" | 30 #include "media/audio/win/audio_manager_win.h" |
27 #include "media/audio/win/core_audio_util_win.h" | 31 #include "media/audio/win/core_audio_util_win.h" |
28 #elif defined(OS_ANDROID) | 32 #elif defined(OS_ANDROID) |
29 #include "media/audio/android/audio_manager_android.h" | 33 #include "media/audio/android/audio_manager_android.h" |
30 #else | 34 #else |
31 #include "media/audio/fake_audio_manager.h" | 35 #include "media/audio/fake_audio_manager.h" |
32 #endif | 36 #endif |
33 | 37 |
34 namespace media { | 38 namespace media { |
35 | 39 |
36 #if defined(USE_ALSA) | 40 #if defined(USE_PULSEAUDIO) |
| 41 typedef AudioManagerPulse AudioManagerAnyPlatform; |
| 42 #elif defined(USE_ALSA) |
37 typedef AudioManagerAlsa AudioManagerAnyPlatform; | 43 typedef AudioManagerAlsa AudioManagerAnyPlatform; |
| 44 #elif defined(USE_CRAS) |
| 45 typedef AudioManagerCras AudioManagerAnyPlatform; |
38 #elif defined(OS_MACOSX) | 46 #elif defined(OS_MACOSX) |
39 typedef AudioManagerMac AudioManagerAnyPlatform; | 47 typedef AudioManagerMac AudioManagerAnyPlatform; |
40 #elif defined(OS_WIN) | 48 #elif defined(OS_WIN) |
41 typedef AudioManagerWin AudioManagerAnyPlatform; | 49 typedef AudioManagerWin AudioManagerAnyPlatform; |
42 #elif defined(OS_ANDROID) | 50 #elif defined(OS_ANDROID) |
43 typedef AudioManagerAndroid AudioManagerAnyPlatform; | 51 typedef AudioManagerAndroid AudioManagerAnyPlatform; |
44 #else | 52 #else |
45 typedef FakeAudioManager AudioManagerAnyPlatform; | 53 typedef FakeAudioManager AudioManagerAnyPlatform; |
46 #endif | 54 #endif |
47 | 55 |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 446 |
439 // All Close() operations that run on the mocked audio thread, | 447 // All Close() operations that run on the mocked audio thread, |
440 // should be synchronous and not post additional close tasks to | 448 // should be synchronous and not post additional close tasks to |
441 // mocked the audio thread. Hence, there is no need to call | 449 // mocked the audio thread. Hence, there is no need to call |
442 // message_loop()->RunUntilIdle() after the Close() methods. | 450 // message_loop()->RunUntilIdle() after the Close() methods. |
443 aos->Close(); | 451 aos->Close(); |
444 ais->Close(); | 452 ais->Close(); |
445 } | 453 } |
446 | 454 |
447 } // namespace media | 455 } // namespace media |
OLD | NEW |