| 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 "media/audio/openbsd/audio_manager_openbsd.h" | 5 #include "media/audio/openbsd/audio_manager_openbsd.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "media/audio/audio_output_dispatcher.h" | 9 #include "media/audio/audio_output_dispatcher.h" |
| 10 #if defined(USE_PULSEAUDIO) | 10 #if defined(USE_PULSEAUDIO) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 AudioInputStream* AudioManagerOpenBSD::MakeLowLatencyInputStream( | 83 AudioInputStream* AudioManagerOpenBSD::MakeLowLatencyInputStream( |
| 84 const AudioParameters& params, const std::string& device_id) { | 84 const AudioParameters& params, const std::string& device_id) { |
| 85 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format); | 85 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format); |
| 86 NOTIMPLEMENTED(); | 86 NOTIMPLEMENTED(); |
| 87 return NULL; | 87 return NULL; |
| 88 } | 88 } |
| 89 | 89 |
| 90 AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream( | 90 AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream( |
| 91 const AudioParameters& params) { | 91 const AudioParameters& params) { |
| 92 if (!initialized()) { | |
| 93 return NULL; | |
| 94 } | |
| 95 | |
| 96 #if defined(USE_PULSEAUDIO) | 92 #if defined(USE_PULSEAUDIO) |
| 97 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePulseAudio)) { | 93 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePulseAudio)) { |
| 98 return new PulseAudioOutputStream(params, this); | 94 return new PulseAudioOutputStream(params, this); |
| 99 } | 95 } |
| 100 #endif | 96 #endif |
| 101 | 97 |
| 102 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
| 103 return NULL; | 99 return NULL; |
| 104 } | 100 } |
| 105 | 101 |
| 106 // static | 102 // static |
| 107 AudioManager* CreateAudioManager() { | 103 AudioManager* CreateAudioManager() { |
| 108 return new AudioManagerOpenBSD(); | 104 return new AudioManagerOpenBSD(); |
| 109 } | 105 } |
| OLD | NEW |