[vlc-devel] [PATCH] Add shorthands for audio channel maps

Rémi Denis-Courmont remi at remlab.net
Sat Mar 3 18:28:42 CET 2012


---
 include/vlc_aout.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 4329646..fe0d355 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -120,6 +120,17 @@ typedef int32_t vlc_fixed_t;
 #define AOUT_CHAN_MIDDLERIGHT       0x200
 #define AOUT_CHAN_LFE               0x1000
 
+#define AOUT_CHANS_FRONT  (AOUT_CHAN_LEFT       | AOUT_CHAN_RIGHT)
+#define AOUT_CHANS_MIDDLE (AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT)
+#define AOUT_CHANS_REAR   (AOUT_CHAN_REARLEFT   | AOUT_CHAN_REARRIGHT)
+
+#define AOUT_CHANS_STEREO (AOUT_CHANS_FRONT)
+#define AOUT_CHANS_4_0    (AOUT_CHANS_FRONT | AOUT_CHANS_REAR)
+#define AOUT_CHANS_4_1    (AOUT_CHANS_4_0 | AOUT_CHAN_LFE)
+#define AOUT_CHANS_5_0    (AOUT_CHANS_4_0 | AOUT_CHAN_CENTER)
+#define AOUT_CHANS_5_1    (AOUT_CHANS_5_0 | AOUT_CHAN_LFE)
+#define AOUT_CHANS_7_1    (AOUT_CHANS_5_1 | AOUT_CHANS_MIDDLE)
+
 /* Values available for original channels only */
 #define AOUT_CHAN_DOLBYSTEREO       0x10000
 #define AOUT_CHAN_DUALMONO          0x20000
-- 
1.7.9.1




More information about the vlc-devel mailing list