| 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/mac/audio_manager_mac.h" | 5 #include "media/audio/mac/audio_manager_mac.h" |
| 6 | 6 |
| 7 #include <CoreAudio/AudioHardware.h> | 7 #include <CoreAudio/AudioHardware.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const AudioParameters& params) { | 331 const AudioParameters& params) { |
| 332 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 332 DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 333 return new PCMQueueOutAudioOutputStream(this, params); | 333 return new PCMQueueOutAudioOutputStream(this, params); |
| 334 } | 334 } |
| 335 | 335 |
| 336 AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream( | 336 AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream( |
| 337 const AudioParameters& params) { | 337 const AudioParameters& params) { |
| 338 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); | 338 DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); |
| 339 | 339 |
| 340 // TODO(crogers): remove once we properly handle input device selection. | 340 // TODO(crogers): remove once we properly handle input device selection. |
| 341 // https://code.google.com/p/chromium/issues/detail?id=147327 |
| 341 if (CommandLine::ForCurrentProcess()->HasSwitch( | 342 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 342 switches::kEnableWebAudioInput)) { | 343 switches::kEnableWebAudioInput)) { |
| 343 if (HasUnifiedDefaultIO()) | 344 if (HasUnifiedDefaultIO()) |
| 344 return new AudioHardwareUnifiedStream(this, params); | 345 return new AudioHardwareUnifiedStream(this, params); |
| 345 | 346 |
| 346 // kAudioDeviceUnknown translates to "use default" here. | 347 // kAudioDeviceUnknown translates to "use default" here. |
| 347 return new AudioSynchronizedStream(this, | 348 return new AudioSynchronizedStream(this, |
| 348 params, | 349 params, |
| 349 kAudioDeviceUnknown, | 350 kAudioDeviceUnknown, |
| 350 kAudioDeviceUnknown); | 351 kAudioDeviceUnknown); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 GetMessageLoop(), base::Bind( | 398 GetMessageLoop(), base::Bind( |
| 398 &AudioManagerMac::NotifyAllOutputDeviceChangeListeners, | 399 &AudioManagerMac::NotifyAllOutputDeviceChangeListeners, |
| 399 base::Unretained(this)))); | 400 base::Unretained(this)))); |
| 400 } | 401 } |
| 401 | 402 |
| 402 AudioManager* CreateAudioManager() { | 403 AudioManager* CreateAudioManager() { |
| 403 return new AudioManagerMac(); | 404 return new AudioManagerMac(); |
| 404 } | 405 } |
| 405 | 406 |
| 406 } // namespace media | 407 } // namespace media |
| OLD | NEW |