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

Unified Diff: media/audio/audio_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager.cc
===================================================================
--- media/audio/audio_manager.cc (revision 57255)
+++ media/audio/audio_manager.cc (working copy)
@@ -1,59 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/audio/audio_manager.h"
-
-#include "base/at_exit.h"
-#include "base/logging.h"
-
-namespace {
-
-AudioManager* g_audio_manager = NULL;
-
-// NullAudioManager is the audio manager used on the systems that have no
-// audio support.
-class NullAudioManager : public AudioManager {
- public:
- NullAudioManager() { }
-
- // Implementation of AudioManager.
- virtual bool HasAudioOutputDevices() { return false; }
- virtual bool HasAudioInputDevices() { return false; }
- virtual AudioOutputStream* MakeAudioOutputStream(Format format, int channels,
- int sample_rate,
- char bits_per_sample) {
- NOTIMPLEMENTED();
- return NULL;
- }
- virtual AudioInputStream* MakeAudioInputStream(Format format, int channels,
- int sample_rate,
- char bits_per_sample,
- uint32 samples_per_packet) {
- NOTIMPLEMENTED();
- return NULL;
- }
- virtual void MuteAll() { NOTIMPLEMENTED(); }
- virtual void UnMuteAll() { NOTIMPLEMENTED(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NullAudioManager);
-};
-
-} // namespace
-
-// static
-void AudioManager::Destroy(void* not_used) {
- delete g_audio_manager;
- g_audio_manager = NULL;
-}
-
-// static
-AudioManager* AudioManager::GetAudioManager() {
- if (!g_audio_manager) {
- g_audio_manager = CreateAudioManager();
- g_audio_manager->Init();
- base::AtExitManager::RegisterCallback(&AudioManager::Destroy, NULL);
- }
- return g_audio_manager;
-}
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698