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" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 | 9 |
9 namespace { | 10 namespace { |
10 AudioManagerOpenBSD* g_audio_manager = NULL; | 11 AudioManagerOpenBSD* g_audio_manager = NULL; |
11 } // namespace | 12 } // namespace |
12 | 13 |
13 // Implementation of AudioManager. | 14 // Implementation of AudioManager. |
14 bool AudioManagerOpenBSD::HasAudioOutputDevices() { | 15 bool AudioManagerOpenBSD::HasAudioOutputDevices() { |
15 NOTIMPLEMENTED(); | 16 NOTIMPLEMENTED(); |
16 return false; | 17 return false; |
(...skipping 23 matching lines...) Expand all Loading... |
40 return NULL; | 41 return NULL; |
41 } | 42 } |
42 | 43 |
43 AudioManagerOpenBSD::AudioManagerOpenBSD() { | 44 AudioManagerOpenBSD::AudioManagerOpenBSD() { |
44 } | 45 } |
45 | 46 |
46 AudioManagerOpenBSD::~AudioManagerOpenBSD() { | 47 AudioManagerOpenBSD::~AudioManagerOpenBSD() { |
47 } | 48 } |
48 | 49 |
49 void AudioManagerOpenBSD::Init() { | 50 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 |