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

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

Issue 509893002: Revert of Remove the last piece of deprecated synchronous IO code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/fake_audio_manager.cc ('k') | media/audio/openbsd/audio_manager_openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 336a8c4994db7eb71da84ff22f837d125cb09318..eabce32381920bd541e983c607b0e7ab6a4023e1 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -674,9 +674,20 @@
channel_layout = CHANNEL_LAYOUT_DISCRETE;
}
+ const int input_channels =
+ has_valid_input_params ? input_params.input_channels() : 0;
+ if (input_channels > 0) {
+ // TODO(xians): given the limitations of the AudioOutputStream
+ // back-ends used with synchronized I/O, we hard-code to stereo.
+ // Specifically, this is a limitation of AudioSynchronizedStream which
+ // can be removed as part of the work to consolidate these back-ends.
+ channel_layout = CHANNEL_LAYOUT_STEREO;
+ }
+
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, output_channels,
- hardware_sample_rate, 16, buffer_size, AudioParameters::NO_EFFECTS);
+ input_channels, hardware_sample_rate, 16, buffer_size,
+ AudioParameters::NO_EFFECTS);
}
void AudioManagerMac::InitializeOnAudioThread() {
« no previous file with comments | « media/audio/fake_audio_manager.cc ('k') | media/audio/openbsd/audio_manager_openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698