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

Unified Diff: media/audio/linux/alsa_output.cc

Issue 173109: Enabled mono playback support for Linux. (Closed)
Patch Set: Nits Created 11 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 | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output.cc
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index 4f02318fdcec87e7b78773d1eca30f117d2276be..d0fda06a16b24cf85f93081fa9264fea992cd8cd 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -167,9 +167,13 @@ AlsaPcmOutputStream::AlsaPcmOutputStream(const std::string& device_name,
message_loop_(message_loop) {
// Sanity check input values.
- // TODO(ajwong): Just try what happens if we allow non 2-channel audio.
- if (channels_ != 2) {
- LOG(WARNING) << "Only 2-channel audio is supported right now.";
+ //
+ // TODO(scherkus): ALSA works fine if you pass in multichannel audio, however
+ // it seems to be mapped to the wrong channels. We may have to do some
+ // channel swizzling from decoder output to ALSA's preferred multichannel
+ // format.
+ if (channels_ != 1 && channels_ != 2) {
+ LOG(WARNING) << "Only 1 and 2 channel audio is supported right now.";
shared_data_.TransitionTo(kInError);
}
« no previous file with comments | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698