Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: media/audio/openbsd/audio_manager_openbsd.cc

Issue 3192017: Revert 57254 - Share one thread between all AudioOutputControllers instead of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698