[vlc-commits] DirectSound: fix setting the default channel in surround cases

Jean-Baptiste Kempf git at videolan.org
Wed Sep 12 16:10:33 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Sep 12 15:36:58 2012 +0200| [f7fae015212800dd2f3aa89a5a9fb6e75ccb75ea] | committer: Jean-Baptiste Kempf

DirectSound: fix setting the default channel in surround cases
(cherry picked from commit a22323f27dfb09f467128be336dc4980d61898a9)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/audio_output/directx.c              |    2 ++
 modules/audio_output/windows_audio_common.h |   26 ++++++++++++++++----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 6945ce8..96a5650 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -458,10 +458,12 @@ static void Probe( audio_output_t * p_aout )
     switch( DSSPEAKER_CONFIG(ui_speaker_config) )
     {
     case DSSPEAKER_7POINT1:
+    case DSSPEAKER_7POINT1_SURROUND:
         msg_Dbg( p_aout, "Windows says your SpeakerConfig is 7.1" );
         val.i_int = AOUT_VAR_7_1;
         break;
     case DSSPEAKER_5POINT1:
+    case DSSPEAKER_5POINT1_SURROUND:
         msg_Dbg( p_aout, "Windows says your SpeakerConfig is 5.1" );
         val.i_int = AOUT_VAR_5_1;
         break;
diff --git a/modules/audio_output/windows_audio_common.h b/modules/audio_output/windows_audio_common.h
index b1acd06..7dc74c2 100644
--- a/modules/audio_output/windows_audio_common.h
+++ b/modules/audio_output/windows_audio_common.h
@@ -98,34 +98,40 @@ typedef struct {
 #endif
 
 #ifndef DSSPEAKER_DSSPEAKER_DIRECTOUT
-#   define DSSPEAKER_DSSPEAKER_DIRECTOUT         0x00000000
+#   define DSSPEAKER_DSSPEAKER_DIRECTOUT  0x00000000
 #endif
 #ifndef DSSPEAKER_HEADPHONE
-#   define DSSPEAKER_HEADPHONE         0x00000001
+#   define DSSPEAKER_HEADPHONE            0x00000001
 #endif
 #ifndef DSSPEAKER_MONO
-#   define DSSPEAKER_MONO              0x00000002
+#   define DSSPEAKER_MONO                 0x00000002
 #endif
 #ifndef DSSPEAKER_QUAD
-#   define DSSPEAKER_QUAD              0x00000003
+#   define DSSPEAKER_QUAD                 0x00000003
 #endif
 #ifndef DSSPEAKER_STEREO
-#   define DSSPEAKER_STEREO            0x00000004
+#   define DSSPEAKER_STEREO               0x00000004
 #endif
 #ifndef DSSPEAKER_SURROUND
-#   define DSSPEAKER_SURROUND          0x00000005
+#   define DSSPEAKER_SURROUND             0x00000005
 #endif
 #ifndef DSSPEAKER_5POINT1
-#   define DSSPEAKER_5POINT1           0x00000006
+#   define DSSPEAKER_5POINT1              0x00000006
+#endif
+#ifndef DSSPEAKER_5POINT1_BACK
+#   define DSSPEAKER_5POINT1_BACK         DSSPEAKER_5POINT1
 #endif
 #ifndef DSSPEAKER_7POINT1
-#   define DSSPEAKER_7POINT1           0x00000007
+#   define DSSPEAKER_7POINT1              0x00000007
 #endif
 #ifndef DSSPEAKER_7POINT1_SURROUND
-#   define DSSPEAKER_7POINT1_SURROUND           0x00000008
+#   define DSSPEAKER_7POINT1_SURROUND     0x00000008
+#endif
+#ifndef DSSPEAKER_5POINT1_SURROUND
+#   define DSSPEAKER_5POINT1_SURROUND     0x00000009
 #endif
 #ifndef DSSPEAKER_7POINT1_WIDE
-#   define DSSPEAKER_7POINT1_WIDE           DSSPEAKER_7POINT1
+#   define DSSPEAKER_7POINT1_WIDE         DSSPEAKER_7POINT1
 #endif
 
 static const uint32_t pi_channels_src[] =



More information about the vlc-commits mailing list