[vlc-commits] Unduplicate WG4 channels order

Rémi Denis-Courmont git at videolan.org
Thu Mar 8 20:49:06 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar  8 21:25:57 2012 +0200| [f39ad0efe9b82c85285bf83635e8610118b4564d] | committer: Rémi Denis-Courmont

Unduplicate WG4 channels order

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

 modules/audio_filter/channel_mixer/dolby.c |   12 +++---------
 modules/audio_filter/channel_mixer/mono.c  |    9 ---------
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/dolby.c b/modules/audio_filter/channel_mixer/dolby.c
index 0319f03..0a6dd13 100644
--- a/modules/audio_filter/channel_mixer/dolby.c
+++ b/modules/audio_filter/channel_mixer/dolby.c
@@ -67,12 +67,6 @@ struct filter_sys_t
     int i_rear_right;
 };
 
-/* our internal channel order (WG-4 order) */
-static const uint32_t pi_channels[] =
-{ AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
-  AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
-  AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0 };
-
 /*****************************************************************************
  * Create: allocate headphone downmixer
  *****************************************************************************/
@@ -115,11 +109,11 @@ static int Create( vlc_object_t *p_this )
     p_sys->i_rear_center = -1;
     p_sys->i_rear_right = -1;
 
-    while ( pi_channels[i] )
+    while ( pi_vlc_chan_order_wg4[i] )
     {
-        if ( p_filter->fmt_out.audio.i_physical_channels & pi_channels[i] )
+        if ( p_filter->fmt_out.audio.i_physical_channels & pi_vlc_chan_order_wg4[i] )
         {
-            switch ( pi_channels[i] )
+            switch ( pi_vlc_chan_order_wg4[i] )
             {
                 case AOUT_CHAN_LEFT:
                     p_sys->i_left = i_offset;
diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c
index 9610ba3..5e01479 100644
--- a/modules/audio_filter/channel_mixer/mono.c
+++ b/modules/audio_filter/channel_mixer/mono.c
@@ -96,15 +96,6 @@ static const char *const ppsz_pos_descriptions[] =
   N_("Center"), N_("Low-frequency effects"),
   N_("Side left"), N_("Side right"), N_("Rear center") };
 
-/* our internal channel order (WG-4 order)
-static const uint32_t pi_vlc_chan_order_wg4[] =
-{
-    AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT,
-    AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
-    AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
-    AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0
-}; */
-
 #define MONO_CFG "sout-mono-"
 /*****************************************************************************
  * Module descriptor



More information about the vlc-commits mailing list