[vlc-commits] Try to fallback to stereo for mono audio in alsa.

Laurent Aimar git at videolan.org
Sat Sep 24 22:52:13 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Sep 24 22:51:26 2011 +0200| [32a7f895d20ffbd4a2e598fda147d8cf6e7484e2] | committer: Laurent Aimar

Try to fallback to stereo for mono audio in alsa.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32a7f895d20ffbd4a2e598fda147d8cf6e7484e2
---

 modules/audio_output/alsa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 89a2838..b72e45a 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -384,7 +384,7 @@ static int Open (vlc_object_t *obj)
 
     /* Set channels count */
     val = snd_pcm_hw_params_set_channels (pcm, hw, channels);
-    if (val && channels > 2) /* Fallback to stereo */
+    if (val && channels != 2) /* Fallback to stereo */
     {
         val = snd_pcm_hw_params_set_channels (pcm, hw, 2);
         channels = 2;



More information about the vlc-commits mailing list