OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/openbsd/audio_manager_openbsd.h" | 5 #include "media/audio/openbsd/audio_manager_openbsd.h" |
6 | 6 |
7 #include "base/at_exit.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 | 8 |
10 namespace { | 9 namespace { |
11 AudioManagerOpenBSD* g_audio_manager = NULL; | 10 AudioManagerOpenBSD* g_audio_manager = NULL; |
12 } // namespace | 11 } // namespace |
13 | 12 |
14 // Implementation of AudioManager. | 13 // Implementation of AudioManager. |
15 bool AudioManagerOpenBSD::HasAudioOutputDevices() { | 14 bool AudioManagerOpenBSD::HasAudioOutputDevices() { |
16 NOTIMPLEMENTED(); | 15 NOTIMPLEMENTED(); |
17 return false; | 16 return false; |
(...skipping 23 matching lines...) Expand all Loading... |
41 return NULL; | 40 return NULL; |
42 } | 41 } |
43 | 42 |
44 AudioManagerOpenBSD::AudioManagerOpenBSD() { | 43 AudioManagerOpenBSD::AudioManagerOpenBSD() { |
45 } | 44 } |
46 | 45 |
47 AudioManagerOpenBSD::~AudioManagerOpenBSD() { | 46 AudioManagerOpenBSD::~AudioManagerOpenBSD() { |
48 } | 47 } |
49 | 48 |
50 void AudioManagerOpenBSD::Init() { | 49 void AudioManagerOpenBSD::Init() { |
| 50 AudioManagerBase::Init(); |
51 } | 51 } |
52 | 52 |
53 void AudioManagerOpenBSD::MuteAll() { | 53 void AudioManagerOpenBSD::MuteAll() { |
54 NOTIMPLEMENTED(); | 54 NOTIMPLEMENTED(); |
55 } | 55 } |
56 | 56 |
57 void AudioManagerOpenBSD::UnMuteAll() { | 57 void AudioManagerOpenBSD::UnMuteAll() { |
58 NOTIMPLEMENTED(); | 58 NOTIMPLEMENTED(); |
59 } | 59 } |
60 | 60 |
61 void DestroyAudioManagerOpenBSD(void* not_used) { | 61 void DestroyAudioManagerOpenBSD(void* not_used) { |
62 delete g_audio_manager; | 62 delete g_audio_manager; |
63 g_audio_manager = NULL; | 63 g_audio_manager = NULL; |
64 } | 64 } |
65 | 65 |
66 AudioManager* AudioManager::GetAudioManager() { | 66 AudioManager* AudioManager::GetAudioManager() { |
67 if (!g_audio_manager) { | 67 if (!g_audio_manager) { |
68 g_audio_manager = new AudioManagerOpenBSD(); | 68 g_audio_manager = new AudioManagerOpenBSD(); |
69 g_audio_manager->Init(); | 69 g_audio_manager->Init(); |
70 base::AtExitManager::RegisterCallback(&DestroyAudioManagerOpenBSD, NULL); | 70 base::AtExitManager::RegisterCallback(&DestroyAudioManagerOpenBSD, NULL); |
71 } | 71 } |
72 return g_audio_manager; | 72 return g_audio_manager; |
73 } | 73 } |
| 74 |
| 75 // static |
| 76 AudioManager* AudioManager::CreateAudioManager() { |
| 77 return new AudioManagerOpenBSD(); |
| 78 } |
OLD | NEW |