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 <CoreAudio/AudioHardware.h> | 5 #include <CoreAudio/AudioHardware.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/mac/mac_logging.h" | 9 #include "base/mac/mac_logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // Prepend the default device to the list since we always want it to be | 248 // Prepend the default device to the list since we always want it to be |
249 // on the top of the list for all platforms. There is no duplicate | 249 // on the top of the list for all platforms. There is no duplicate |
250 // counting here since the default device has been abstracted out before. | 250 // counting here since the default device has been abstracted out before. |
251 media::AudioDeviceName name; | 251 media::AudioDeviceName name; |
252 name.device_name = AudioManagerBase::kDefaultDeviceName; | 252 name.device_name = AudioManagerBase::kDefaultDeviceName; |
253 name.unique_id = AudioManagerBase::kDefaultDeviceId; | 253 name.unique_id = AudioManagerBase::kDefaultDeviceId; |
254 device_names->push_front(name); | 254 device_names->push_front(name); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 void AudioManagerMac::MuteAll() { | |
259 // TODO(cpu): implement. | |
260 } | |
261 | |
262 void AudioManagerMac::UnMuteAll() { | |
263 // TODO(cpu): implement. | |
264 } | |
265 | |
266 AudioOutputStream* AudioManagerMac::MakeLinearOutputStream( | 258 AudioOutputStream* AudioManagerMac::MakeLinearOutputStream( |
267 const AudioParameters& params) { | 259 const AudioParameters& params) { |
268 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 260 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
269 return new PCMQueueOutAudioOutputStream(this, params); | 261 return new PCMQueueOutAudioOutputStream(this, params); |
270 } | 262 } |
271 | 263 |
272 AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream( | 264 AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream( |
273 const AudioParameters& params) { | 265 const AudioParameters& params) { |
274 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 266 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
275 return new AUAudioOutputStream(this, params); | 267 return new AUAudioOutputStream(this, params); |
(...skipping 16 matching lines...) Expand all Loading... |
292 stream = new AUAudioInputStream(this, params, audio_device_id); | 284 stream = new AUAudioInputStream(this, params, audio_device_id); |
293 | 285 |
294 return stream; | 286 return stream; |
295 } | 287 } |
296 | 288 |
297 AudioManager* CreateAudioManager() { | 289 AudioManager* CreateAudioManager() { |
298 return new AudioManagerMac(); | 290 return new AudioManagerMac(); |
299 } | 291 } |
300 | 292 |
301 } // namespace media | 293 } // namespace media |
OLD | NEW |