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

Unified Diff: media/audio/mac/audio_auhal_mac.cc

Issue 2771093002: Use AudioUnit instead of AudioDevice properties to get channel count. (Closed)
Patch Set: Revert deletion of GetDeviceTotalChannelCount. Created 3 years, 9 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/BUILD.gn ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_auhal_mac.cc
diff --git a/media/audio/mac/audio_auhal_mac.cc b/media/audio/mac/audio_auhal_mac.cc
index e11885fa3d0a5e599a0462a698bc9c3063cb89b2..83c9b22e19ea5ff8bc4fd3580cd2c779b1b4fccf 100644
--- a/media/audio/mac/audio_auhal_mac.cc
+++ b/media/audio/mac/audio_auhal_mac.cc
@@ -114,30 +114,6 @@ bool AUHALStream::Open() {
DCHECK(!audio_unit_);
DVLOG(1) << "Open";
- // Get the total number of output channels that the
- // hardware supports.
- int device_output_channels;
- bool got_output_channels = AudioManagerMac::GetDeviceChannels(
- device_,
- kAudioDevicePropertyScopeOutput,
- &device_output_channels);
-
- // Sanity check the requested output channels.
- if (!got_output_channels ||
- output_channels_ <= 0 || output_channels_ > device_output_channels) {
- LOG(ERROR) << "AudioDevice does not support requested output channels.";
- return false;
- }
-
- // The requested sample-rate must match the hardware sample-rate.
- int sample_rate = AudioManagerMac::HardwareSampleRateForDevice(device_);
-
- if (sample_rate != params_.sample_rate()) {
- LOG(ERROR) << "Requested sample-rate: " << params_.sample_rate()
- << " must match the hardware sample-rate: " << sample_rate;
- return false;
- }
-
// The output bus will wrap the AudioBufferList given to us in
// the Render() callback.
DCHECK_GT(output_channels_, 0);
« no previous file with comments | « media/audio/BUILD.gn ('k') | media/audio/mac/audio_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698