]> git.sesse.net Git - vlc/commitdiff
* configure.ac.in, modules/audio_output/directx.c, modules/audio_output/waveout.c:
authorGildas Bazin <gbazin@videolan.org>
Fri, 15 Nov 2002 16:27:10 +0000 (16:27 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 15 Nov 2002 16:27:10 +0000 (16:27 +0000)
   fixed the waveout and directx audio plugins after the recent changes to aout3.

configure.ac.in
modules/audio_output/directx.c
modules/audio_output/waveout.c

index 8690ea921d804b081fed7d163ec7ab4c42253d30..91d3caa2999d065f9198971cf0fa69edb0efcc7b 100644 (file)
@@ -926,7 +926,7 @@ dnl
 dnl  libdvbpsi ts demux
 dnl
 AC_ARG_ENABLE(dvbpsi,
-[  --enable-dvbpsi        dvbpsi ts demux module (default disabled)])
+[  --enable-dvbpsi         dvbpsi ts demux module (default disabled)])
 if test "x${enable_dvbpsi}" != "xno"
 then
   AC_ARG_WITH(dvbpsi,
@@ -1468,7 +1468,7 @@ dnl
 dnl  Vorbis plugin
 dnl
 AC_ARG_ENABLE(vorbis,
-  [  --enable-vorbis            Vorbis decoder support (default enabled)])
+  [  --enable-vorbis         Vorbis decoder support (default enabled)])
 if test "x${enable_vorbis}" != "xno"
 then
   AC_CHECK_HEADERS(vorbis/codec.h, [
@@ -1814,7 +1814,7 @@ AC_ARG_ENABLE(waveout,
   [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
 if test "x${enable_waveout}" != "xno"; then
   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
-    #PLUGINS="${PLUGINS} waveout"
+    PLUGINS="${PLUGINS} waveout"
     LDFLAGS_waveout="-lwinmm"
   fi
 fi
index 23a0be19c9c6c4b2ea70136daaf0fb24db072d71..2e830cf777ce023b242539d8f3d8daf41a579868 100644 (file)
@@ -2,7 +2,7 @@
  * directx.c: Windows DirectX audio output method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: directx.c,v 1.7 2002/11/01 15:43:55 gbazin Exp $
+ * $Id: directx.c,v 1.8 2002/11/15 16:27:10 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -379,10 +379,17 @@ static int DirectxCreateSecondaryBuffer( aout_instance_t *p_aout )
     int                  i_nb_channels, i;
 
     i_nb_channels = aout_FormatNbChannels( &p_aout->output.output );
-    if ( i_nb_channels > 2 )
+    if ( i_nb_channels >= 2 )
     {
         i_nb_channels = 2;
-        p_aout->output.output.i_channels = AOUT_CHAN_STEREO;
+        p_aout->output.output.i_physical_channels =
+            AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
+    }
+    else
+    {
+        i_nb_channels = 1;
+        p_aout->output.output.i_physical_channels =
+            AOUT_CHAN_CENTER;
     }
 
     /* First set the buffer format */
index 2a860647034ff2641b7f8b408a9ba6cc42b5377c..34cd18c5226c88c2921743de36e278d19b2ae5ee 100644 (file)
@@ -2,7 +2,7 @@
  * waveout.c : Windows waveOut plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: waveout.c,v 1.10 2002/10/28 22:31:49 gbazin Exp $
+ * $Id: waveout.c,v 1.11 2002/11/15 16:27:10 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -114,11 +114,17 @@ static int Open( vlc_object_t *p_this )
     aout_VolumeSoftInit( p_aout );
 
     i_nb_channels = aout_FormatNbChannels( &p_aout->output.output );
-    if ( i_nb_channels > 2 )
+    if ( i_nb_channels >= 2 )
     {
-        /* Waveout doesn't support more than two channels. */
         i_nb_channels = 2;
-        p_aout->output.output.i_channels = AOUT_CHAN_STEREO;
+        p_aout->output.output.i_physical_channels =
+            AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
+    }
+    else
+    {
+        i_nb_channels = 1;
+        p_aout->output.output.i_physical_channels =
+            AOUT_CHAN_CENTER;
     }
 
     /* We need to open the device with default values to be sure it is