]> git.sesse.net Git - vlc/commitdiff
Replaced AOUT_FMT_*_NE/IE by by VLC_CODEC equivalents.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 14 May 2009 19:23:01 +0000 (21:23 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 15 May 2009 20:05:37 +0000 (22:05 +0200)
22 files changed:
include/vlc_aout.h
include/vlc_fourcc.h
modules/audio_filter/channel_mixer/mono.c
modules/audio_filter/converter/fixed.c
modules/audio_filter/converter/float.c
modules/audio_filter/format.c
modules/audio_output/alsa.c
modules/audio_output/file.c
modules/audio_output/hd1000a.cpp
modules/audio_output/oss.c
modules/codec/adpcm.c
modules/codec/araw.c
modules/codec/avcodec/audio.c
modules/codec/avcodec/encoder.c
modules/codec/dmo/dmo.c
modules/codec/faad.c
modules/codec/flac.c
modules/codec/quicktime.c
modules/codec/realaudio.c
modules/codec/speex.c
modules/codec/twolame.c
modules/gui/qnx/aout.c

index e64390de0eeaeadbba4111b629a744768120f6c7..21b67fbdb6a47e4ed8a9a93ab569da508bed4cdc 100644 (file)
@@ -47,18 +47,8 @@ extern "C" {
       && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
       && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
 
-#define AOUT_FMT_S16_NE VLC_CODEC_S16N
-#define AOUT_FMT_U16_NE VLC_CODEC_U16N
-#define AOUT_FMT_S24_NE VLC_CODEC_S24N
-#define AOUT_FMT_S32_NE VLC_CODEC_S32N
-
 #define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i')
 #define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b')
-#ifdef WORDS_BIGENDIAN
-#   define AOUT_FMT_SPDIF_NE VLC_CODEC_SPDIFB
-#else
-#   define AOUT_FMT_SPDIF_NE VLC_CODEC_SPDIFL
-#endif
 
 #define AOUT_FMT_NON_LINEAR( p_format )                 \
     ( ((p_format)->i_format == VLC_CODEC_SPDIFL)       \
index 6794e5df6d670257998a0ea73745081fa23574c1..c212f279f319dfbec4265595f9ea53e08e4e8c34 100644 (file)
 #define VLC_CODEC_CVD       VLC_FOURCC('c','v','d',' ')
 
 
-/* Special endian dependant values */
+/* Special endian dependant values
+ * The suffic N means Native
+ * The suffix I means Inverted (ie non native) */
 #ifdef WORDS_BIGENDIAN
 #   define VLC_CODEC_S16N VLC_CODEC_S16B
 #   define VLC_CODEC_U16N VLC_CODEC_U16B
 #   define VLC_CODEC_S24N VLC_CODEC_S24B
 #   define VLC_CODEC_S32N VLC_CODEC_S32B
+
+#   define VLC_CODEC_S16I VLC_CODEC_S16L
+#   define VLC_CODEC_U16I VLC_CODEC_U16L
+#   define VLC_CODEC_S24I VLC_CODEC_S24L
+#   define VLC_CODEC_S32I VLC_CODEC_S32L
 #else
 #   define VLC_CODEC_S16N VLC_CODEC_S16L
 #   define VLC_CODEC_U16N VLC_CODEC_U16L
 #   define VLC_CODEC_S24N VLC_CODEC_S24L
 #   define VLC_CODEC_S32N VLC_CODEC_S32L
+
+#   define VLC_CODEC_S16I VLC_CODEC_S16B
+#   define VLC_CODEC_U16I VLC_CODEC_U16B
+#   define VLC_CODEC_S24I VLC_CODEC_S24B
+#   define VLC_CODEC_S32I VLC_CODEC_S32B
 #endif
 
 /* Non official codecs, used to force a profile in an encoder */
index 77bc29f2b1e346cb46283e28396c7e3a086cf369..7e4af3d792bfe3ea1ac0efbba3383d93aac8c9a5 100644 (file)
@@ -358,8 +358,8 @@ static int OpenFilter( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if( (p_filter->fmt_in.i_codec != AOUT_FMT_S16_NE) ||
-        (p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) )
+    if( (p_filter->fmt_in.i_codec != VLC_CODEC_S16N) ||
+        (p_filter->fmt_out.i_codec != VLC_CODEC_S16N) )
     {
         /*msg_Err( p_this, "filter discarded (invalid format)" );*/
         return VLC_EGENERIC;
@@ -367,8 +367,8 @@ static int OpenFilter( vlc_object_t *p_this )
 
     if( (p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format) &&
         (p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate) &&
-        (p_filter->fmt_in.audio.i_format != AOUT_FMT_S16_NE) &&
-        (p_filter->fmt_out.audio.i_format != AOUT_FMT_S16_NE) &&
+        (p_filter->fmt_in.audio.i_format != VLC_CODEC_S16N) &&
+        (p_filter->fmt_out.audio.i_format != VLC_CODEC_S16N) &&
         (p_filter->fmt_in.audio.i_bitspersample !=
                                     p_filter->fmt_out.audio.i_bitspersample))
     {
index c4634b6051ebdb5af21f73d6476039fbe03220c4..c77027903a2e0a2a8dc97afadf30a2c2c0b1e968 100644 (file)
@@ -74,7 +74,7 @@ static int Create_F32ToS16( vlc_object_t *p_this )
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
     if ( p_filter->input.i_format != VLC_CODEC_FI32
-          || p_filter->output.i_format != AOUT_FMT_S16_NE )
+          || p_filter->output.i_format != VLC_CODEC_S16N )
     {
         return -1;
     }
@@ -158,7 +158,7 @@ static int Create_S16ToF32( vlc_object_t *p_this )
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
     if ( p_filter->output.i_format != VLC_CODEC_FI32
-          || p_filter->input.i_format != AOUT_FMT_S16_NE )
+          || p_filter->input.i_format != VLC_CODEC_S16N )
     {
         return -1;
     }
index 1664a7a420454f732dfce3797d19a90649530557..b92717511dd5d2f77c858ba7f42a7bc412f88364 100644 (file)
@@ -203,7 +203,7 @@ static int Create_FL32ToS16( vlc_object_t *p_this )
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
     if ( p_filter->input.i_format != VLC_CODEC_FL32
-          || p_filter->output.i_format != AOUT_FMT_S16_NE )
+          || p_filter->output.i_format != VLC_CODEC_S16N )
     {
         return -1;
     }
@@ -303,7 +303,7 @@ static int Create_FL32ToU16( vlc_object_t *p_this )
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
     if ( p_filter->input.i_format != VLC_CODEC_FL32
-          || p_filter->output.i_format != AOUT_FMT_U16_NE )
+          || p_filter->output.i_format != VLC_CODEC_U16N )
     {
         return -1;
     }
@@ -392,9 +392,9 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( ( p_filter->input.i_format != AOUT_FMT_S16_NE &&
-           p_filter->input.i_format != AOUT_FMT_S24_NE &&
-           p_filter->input.i_format != AOUT_FMT_S32_NE )
+    if ( ( p_filter->input.i_format != VLC_CODEC_S16N &&
+           p_filter->input.i_format != VLC_CODEC_S24N &&
+           p_filter->input.i_format != VLC_CODEC_S32N )
           || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
@@ -405,9 +405,9 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
         return -1;
     }
 
-    if( p_filter->input.i_format == AOUT_FMT_S32_NE )
+    if( p_filter->input.i_format == VLC_CODEC_S32N )
         p_filter->pf_do_work = Do_S32ToFL32;
-    else if( p_filter->input.i_format == AOUT_FMT_S24_NE )
+    else if( p_filter->input.i_format == VLC_CODEC_S24N )
         p_filter->pf_do_work = Do_S24ToFL32;
     else
         p_filter->pf_do_work = Do_S16ToFL32;
@@ -508,7 +508,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
     if ( (p_filter->input.i_format == VLC_CODEC_S16L ||
          p_filter->input.i_format == VLC_CODEC_S16B)
          && p_filter->output.i_format == VLC_CODEC_FL32
-         && p_filter->input.i_format != AOUT_FMT_S16_NE )
+         && p_filter->input.i_format != VLC_CODEC_S16N )
     {
         p_filter->pf_do_work = Do_S16ToFL32_SW;
         p_filter->b_in_place = true;
@@ -519,7 +519,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
     if ( (p_filter->input.i_format == VLC_CODEC_S24L ||
          p_filter->input.i_format == VLC_CODEC_S24B)
          && p_filter->output.i_format == VLC_CODEC_FL32
-         && p_filter->input.i_format != AOUT_FMT_S24_NE )
+         && p_filter->input.i_format != VLC_CODEC_S24N )
     {
         p_filter->pf_do_work = Do_S24ToFL32_SW;
         p_filter->b_in_place = true;
@@ -530,7 +530,7 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
     if ( (p_filter->input.i_format == VLC_CODEC_S32L ||
          p_filter->input.i_format == VLC_CODEC_S32B)
          && p_filter->output.i_format == VLC_CODEC_FL32
-         && p_filter->input.i_format != AOUT_FMT_S32_NE )
+         && p_filter->input.i_format != VLC_CODEC_S32N )
     {
         p_filter->pf_do_work = Do_S32ToFL32_SW;
         p_filter->b_in_place = true;
index 242900b0e88d1dd2fe3f6313dbba86d467f581a8..6f8a6046557d723b6ee6ee15e8845b48d91e2dae 100644 (file)
 #include <vlc_block.h>
 #include "vlc_filter.h"
 
-#ifdef WORDS_BIGENDIAN
-#   define AOUT_FMT_S24_IE VLC_CODEC_S24L
-#   define AOUT_FMT_S16_IE VLC_CODEC_S16L
-#   define AOUT_FMT_U16_IE VLC_CODEC_U16L
-#else
-#   define AOUT_FMT_S24_IE VLC_CODEC_S24B
-#   define AOUT_FMT_S16_IE VLC_CODEC_S16B
-#   define AOUT_FMT_U16_IE VLC_CODEC_U16B
-#endif
-
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -125,74 +114,74 @@ static const struct
 } ConvertTable[] =
 {
     /* From fl32 */
-    { VLC_CODEC_FL32, AOUT_FMT_S24_NE, Float32toS24 },
-    { VLC_CODEC_FL32, AOUT_FMT_S16_NE, Float32toS16 },
-    { VLC_CODEC_FL32, AOUT_FMT_U16_NE, Float32toU16 },
-    { VLC_CODEC_FL32, AOUT_FMT_S24_IE, Float32toS24Invert },
-    { VLC_CODEC_FL32, AOUT_FMT_S16_IE, Float32toS16Invert },
-    { VLC_CODEC_FL32, AOUT_FMT_U16_IE, Float32toU16Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_S24N, Float32toS24 },
+    { VLC_CODEC_FL32, VLC_CODEC_S16N, Float32toS16 },
+    { VLC_CODEC_FL32, VLC_CODEC_U16N, Float32toU16 },
+    { VLC_CODEC_FL32, VLC_CODEC_S24I, Float32toS24Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_S16I, Float32toS16Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_U16I, Float32toU16Invert },
     { VLC_CODEC_FL32, VLC_CODEC_S8, Float32toS8 },
     { VLC_CODEC_FL32, VLC_CODEC_U8, Float32toU8 },
 
     /* From s24 invert */
-    { AOUT_FMT_S24_NE, VLC_CODEC_FL32, S24toFloat32 },
-    { AOUT_FMT_S24_NE, AOUT_FMT_S24_IE,             Swap24 },
-    { AOUT_FMT_S24_NE, AOUT_FMT_S16_NE,             S24toS16 },
-    { AOUT_FMT_S24_NE, AOUT_FMT_S16_IE,             S24toS16Invert },
+    { VLC_CODEC_S24N, VLC_CODEC_FL32, S24toFloat32 },
+    { VLC_CODEC_S24N, VLC_CODEC_S24I,             Swap24 },
+    { VLC_CODEC_S24N, VLC_CODEC_S16N,             S24toS16 },
+    { VLC_CODEC_S24N, VLC_CODEC_S16I,             S24toS16Invert },
 
     /* From s16 */
-    { AOUT_FMT_S16_NE, VLC_CODEC_FL32, S16toFloat32 },
-    { AOUT_FMT_S16_NE, AOUT_FMT_S24_NE,             S16toS24 },
-    { AOUT_FMT_S16_NE, AOUT_FMT_S24_IE,             S16toS24Invert },
-    { AOUT_FMT_S16_NE, AOUT_FMT_S16_IE,             Swap16 },
-    { AOUT_FMT_S16_NE, AOUT_FMT_U16_IE,             S16toU16 },
-    { AOUT_FMT_S16_NE, VLC_CODEC_S8, S16toS8 },
-    { AOUT_FMT_S16_NE, VLC_CODEC_U8, S16toU8 },
+    { VLC_CODEC_S16N, VLC_CODEC_FL32, S16toFloat32 },
+    { VLC_CODEC_S16N, VLC_CODEC_S24N,             S16toS24 },
+    { VLC_CODEC_S16N, VLC_CODEC_S24I,             S16toS24Invert },
+    { VLC_CODEC_S16N, VLC_CODEC_S16I,             Swap16 },
+    { VLC_CODEC_S16N, VLC_CODEC_U16I,             S16toU16 },
+    { VLC_CODEC_S16N, VLC_CODEC_S8, S16toS8 },
+    { VLC_CODEC_S16N, VLC_CODEC_U8, S16toU8 },
 
     /* From u16 */
-    { AOUT_FMT_U16_NE, VLC_CODEC_FL32, U16toFloat32 },
-    { AOUT_FMT_U16_NE, AOUT_FMT_U16_IE,             Swap16 },
-    { AOUT_FMT_U16_NE, AOUT_FMT_S16_IE,             U16toS16 },
-    { AOUT_FMT_U16_NE, VLC_CODEC_S8, U16toS8 },
-    { AOUT_FMT_U16_NE, VLC_CODEC_U8, U16toU8 },
+    { VLC_CODEC_U16N, VLC_CODEC_FL32, U16toFloat32 },
+    { VLC_CODEC_U16N, VLC_CODEC_U16I,             Swap16 },
+    { VLC_CODEC_U16N, VLC_CODEC_S16I,             U16toS16 },
+    { VLC_CODEC_U16N, VLC_CODEC_S8, U16toS8 },
+    { VLC_CODEC_U16N, VLC_CODEC_U8, U16toU8 },
 
     /* From s8 */
     { VLC_CODEC_S8, VLC_CODEC_FL32, S8toFloat32 },
-    { VLC_CODEC_S8, AOUT_FMT_S16_NE,             S8toS16 },
-    { VLC_CODEC_S8, AOUT_FMT_S16_IE,             S8toS16Invert },
-    { VLC_CODEC_S8, AOUT_FMT_U16_NE,             S8toU16 },
-    { VLC_CODEC_S8, AOUT_FMT_U16_IE,             S8toU16Invert },
+    { VLC_CODEC_S8, VLC_CODEC_S16N,             S8toS16 },
+    { VLC_CODEC_S8, VLC_CODEC_S16I,             S8toS16Invert },
+    { VLC_CODEC_S8, VLC_CODEC_U16N,             S8toU16 },
+    { VLC_CODEC_S8, VLC_CODEC_U16I,             S8toU16Invert },
     { VLC_CODEC_S8, VLC_CODEC_U8, S8toU8 },
  
     /* From u8 */
     { VLC_CODEC_U8, VLC_CODEC_FL32, U8toFloat32 },
-    { VLC_CODEC_U8, AOUT_FMT_S16_NE,             U8toS16 },
-    { VLC_CODEC_U8, AOUT_FMT_S16_IE,             U8toS16Invert },
-    { VLC_CODEC_U8, AOUT_FMT_U16_NE,             U8toU16 },
-    { VLC_CODEC_U8, AOUT_FMT_U16_IE,             U8toU16Invert },
+    { VLC_CODEC_U8, VLC_CODEC_S16N,             U8toS16 },
+    { VLC_CODEC_U8, VLC_CODEC_S16I,             U8toS16Invert },
+    { VLC_CODEC_U8, VLC_CODEC_U16N,             U8toU16 },
+    { VLC_CODEC_U8, VLC_CODEC_U16I,             U8toU16Invert },
     { VLC_CODEC_U8, VLC_CODEC_S8, U8toS8 },
 
     /* From s24 invert */
-    { AOUT_FMT_S24_IE, VLC_CODEC_FL32, S24InverttoFloat32 },
-    { AOUT_FMT_S24_IE, AOUT_FMT_S24_NE,             Swap24 },
-    { AOUT_FMT_S24_IE, AOUT_FMT_S16_NE,             S24InverttoS16 },
-    { AOUT_FMT_S24_IE, AOUT_FMT_S16_IE,             S24InverttoS16Invert },
+    { VLC_CODEC_S24I, VLC_CODEC_FL32, S24InverttoFloat32 },
+    { VLC_CODEC_S24I, VLC_CODEC_S24N,             Swap24 },
+    { VLC_CODEC_S24I, VLC_CODEC_S16N,             S24InverttoS16 },
+    { VLC_CODEC_S24I, VLC_CODEC_S16I,             S24InverttoS16Invert },
 
     /* From s16 invert */
-    { AOUT_FMT_S16_IE, VLC_CODEC_FL32, S16InverttoFloat32 },
-    { AOUT_FMT_S16_IE, AOUT_FMT_S24_NE,             S16InverttoS24 },
-    { AOUT_FMT_S16_IE, AOUT_FMT_S24_IE,             S16InverttoS24Invert },
-    { AOUT_FMT_S16_IE, AOUT_FMT_S16_NE,             Swap16 },
-    { AOUT_FMT_S16_IE, AOUT_FMT_U16_NE,             S16InverttoU16 },
-    { AOUT_FMT_S16_IE, VLC_CODEC_S8, S16InverttoS8 },
-    { AOUT_FMT_S16_IE, VLC_CODEC_U8, S16InverttoU8 },
+    { VLC_CODEC_S16I, VLC_CODEC_FL32, S16InverttoFloat32 },
+    { VLC_CODEC_S16I, VLC_CODEC_S24N,             S16InverttoS24 },
+    { VLC_CODEC_S16I, VLC_CODEC_S24I,             S16InverttoS24Invert },
+    { VLC_CODEC_S16I, VLC_CODEC_S16N,             Swap16 },
+    { VLC_CODEC_S16I, VLC_CODEC_U16N,             S16InverttoU16 },
+    { VLC_CODEC_S16I, VLC_CODEC_S8, S16InverttoS8 },
+    { VLC_CODEC_S16I, VLC_CODEC_U8, S16InverttoU8 },
 
     /* From u16 invert */
-    { AOUT_FMT_U16_IE, VLC_CODEC_FL32, U16InverttoFloat32 },
-    { AOUT_FMT_U16_IE, AOUT_FMT_U16_NE,             Swap16 },
-    { AOUT_FMT_U16_IE, AOUT_FMT_S16_NE,             U16InverttoS16 },
-    { AOUT_FMT_U16_IE, VLC_CODEC_S8, U16InverttoS8 },
-    { AOUT_FMT_U16_IE, VLC_CODEC_U8, U16InverttoU8 },
+    { VLC_CODEC_U16I, VLC_CODEC_FL32, U16InverttoFloat32 },
+    { VLC_CODEC_U16I, VLC_CODEC_U16N,             Swap16 },
+    { VLC_CODEC_U16I, VLC_CODEC_S16N,             U16InverttoS16 },
+    { VLC_CODEC_U16I, VLC_CODEC_S8, U16InverttoS8 },
+    { VLC_CODEC_U16I, VLC_CODEC_U8, U16InverttoU8 },
 
     { 0, 0, NULL },
 };
index 03fd35bdbdf04a7e5b685b8bb881cc52b85af73c..fb2f45c1aae6e7555cd09d2c27a7e54b8198d03d 100644 (file)
@@ -365,7 +365,7 @@ static int Open( vlc_object_t *p_this )
     }
     else
     {
-        i_vlc_pcm_format = AOUT_FMT_S16_NE;
+        i_vlc_pcm_format = VLC_CODEC_S16N;
         i_snd_pcm_format = SND_PCM_FORMAT_S16;
     }
 
@@ -547,7 +547,7 @@ static int Open( vlc_object_t *p_this )
             i_vlc_pcm_format = VLC_CODEC_FL32;
             break;
         case SND_PCM_FORMAT_S16:
-            i_vlc_pcm_format = AOUT_FMT_S16_NE;
+            i_vlc_pcm_format = VLC_CODEC_S16N;
             break;
         }
         p_aout->output.output.i_format = i_vlc_pcm_format;
@@ -624,7 +624,7 @@ static int Open( vlc_object_t *p_this )
             {
                 b_retry = true;
                 i_snd_pcm_format = SND_PCM_FORMAT_S16;
-                p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+                p_aout->output.output.i_format = VLC_CODEC_S16N;
                 msg_Warn( p_aout, "unable to commit hardware configuration "
                                   "with fl32 samples. Retrying with s16l (%s)",                                     snd_strerror( i_snd_rc ) );
             }
index 366fe825fad68b651c2ef5e42a2af38c255c50fe..cb9bc0c8897ab001d86caf46a1f60439f4d86e13 100644 (file)
@@ -97,7 +97,7 @@ static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le",
                                      "float32", "spdif" };
 static const int format_int[] = { VLC_CODEC_U8,
                                   VLC_CODEC_S8,
-                                  AOUT_FMT_U16_NE, AOUT_FMT_S16_NE,
+                                  VLC_CODEC_U16N, VLC_CODEC_S16N,
                                   VLC_CODEC_U16L,
                                   VLC_CODEC_S16L,
                                   VLC_CODEC_U16B,
index 78a77d1cba7e0d3ea85d5b06ad594884c0fe7ab0..1b736dabc2c5871f82d57bd8cde12cf097f2e4cd 100644 (file)
@@ -156,7 +156,7 @@ static int Open( vlc_object_t * p_this )
         }
     }
 
-    p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+    p_aout->output.output.i_format = VLC_CODEC_S16N;
     p_aout->output.i_nb_samples = FRAME_SIZE;
     p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
index 3688e6ff39a7ed05eb2c8e7619beed4740dbaff7..6ee0688655bd63e73786d86170262f0b672fc5da 100644 (file)
@@ -330,7 +330,7 @@ static int Open( vlc_object_t *p_this )
     }
     else if ( val.i_int == AOUT_VAR_5_1 )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
                | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT
@@ -338,20 +338,20 @@ static int Open( vlc_object_t *p_this )
     }
     else if ( val.i_int == AOUT_VAR_2F2R )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT
                | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT;
     }
     else if ( val.i_int == AOUT_VAR_STEREO )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
     }
     else if ( val.i_int == AOUT_VAR_MONO )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER;
     }
     else
index d62cdaa5bffc305d03fbdf33994821f577ba1a4c..61f749fd107757f2707d549a3aef976092332d46 100644 (file)
@@ -247,7 +247,7 @@ static int OpenDecoder( vlc_object_t *p_this )
              p_sys->i_samplesperblock );
 
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+    p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
     p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
     p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels;
     p_dec->fmt_out.audio.i_physical_channels =
index d049be451ba3657de2d208a0b0f0d8db6a9b68d8..d59b417805545ab7346b070e5c5ba92506e51205 100644 (file)
@@ -347,13 +347,13 @@ static int DecoderOpen( vlc_object_t *p_this )
     }
     else if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW )
     {
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
         p_sys->p_logtos16  = alawtos16;
         p_dec->fmt_in.audio.i_bitspersample = 8;
     }
     else if( p_dec->fmt_in.i_codec == VLC_CODEC_MULAW )
     {
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
         p_sys->p_logtos16  = ulawtos16;
         p_dec->fmt_in.audio.i_bitspersample = 8;
     }
@@ -1406,13 +1406,13 @@ static int EncoderOpen( vlc_object_t *p_this )
     if( p_enc->fmt_out.i_codec == VLC_CODEC_ALAW)
     {
         p_enc->fmt_in.audio.i_bitspersample = 16;
-        p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+        p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
         p_sys->i_s16tolog = ALAW;
     }
     else if( p_enc->fmt_out.i_codec == VLC_CODEC_MULAW )
     {
         p_enc->fmt_in.audio.i_bitspersample = 16;
-        p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+        p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
         p_sys->i_s16tolog = ULAW;
     }
 
index bb680e384200f8b86d0d2c9a58d1bfda4619c2ee..8a6f8024caeffbd2c6ea295da1e75fe5c534d266 100644 (file)
@@ -458,7 +458,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
         p_dec->fmt_out.audio.i_bitspersample = 8;
         break;
     case SAMPLE_FMT_S32:
-        p_dec->fmt_out.i_codec = AOUT_FMT_S32_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S32N;
         p_dec->fmt_out.audio.i_bitspersample = 32;
         break;
     case SAMPLE_FMT_FLT:
@@ -472,12 +472,12 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
 
     case SAMPLE_FMT_S16:
     default:
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
         p_dec->fmt_out.audio.i_bitspersample = 16;
         break;
     }
 #else
-    p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+    p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
     p_dec->fmt_out.audio.i_bitspersample = 16;
 #endif
     p_dec->fmt_out.audio.i_rate     = p_sys->p_context->sample_rate;
index a77e1df946ae403615b7c8deefe76dbb8bdce294..44e2f6c9e912a57c047d369b10437d5d20ee1e9f 100644 (file)
@@ -584,7 +584,7 @@ int OpenEncoder( vlc_object_t *p_this )
         if( i_codec_id == CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 )
             p_enc->fmt_in.audio.i_channels = 2;
 
-        p_enc->fmt_in.i_codec  = AOUT_FMT_S16_NE;
+        p_enc->fmt_in.i_codec  = VLC_CODEC_S16N;
         p_context->sample_rate = p_enc->fmt_out.audio.i_rate;
         p_context->channels    = p_enc->fmt_out.audio.i_channels;
 
index 159d5f12c596891f6f5613460f657b6bd3011d76..f958c3f1c4d287b6139314a6d39f1c371965bb51 100644 (file)
@@ -452,7 +452,7 @@ static int DecOpen( decoder_t *p_dec )
     if( p_dec->fmt_in.i_cat == AUDIO_ES )
     {
         /* Setup the format */
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
         p_dec->fmt_out.audio.i_rate     = p_dec->fmt_in.audio.i_rate;
         p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels;
         p_dec->fmt_out.audio.i_bitspersample = 16;//p_dec->fmt_in.audio.i_bitspersample; We request 16
@@ -1246,7 +1246,7 @@ static int EncoderSetAudioType( encoder_t *p_enc, IMediaObject *p_dmo )
     fourcc_to_wf_tag( p_enc->fmt_out.i_codec, &i_tag );
     if( i_tag == 0 ) return VLC_EGENERIC;
 
-    p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+    p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
     p_enc->fmt_in.audio.i_bitspersample = 16;
 
     /* We first need to choose an output type from the predefined
index 1f4f079d7c74731deefc4e7f0cf57f95d82e1dcd..3633bc893dfa6d6f89c72ecd7837845fc85980bb 100644 (file)
@@ -140,7 +140,7 @@ static int Open( vlc_object_t *p_this )
     if (vlc_CPU() & CPU_CAPABILITY_FPU)
         p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
     else
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
     p_dec->pf_decode_audio = DecodeBlock;
 
     p_dec->fmt_out.audio.i_physical_channels =
index b250cc3c3b5099a187a65d86057483fc73eed74d..856019b004a4f0efdc3b3a8c578924985ad35512 100644 (file)
@@ -688,10 +688,10 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
             p_dec->fmt_out.i_codec = VLC_CODEC_S8;
             break;
         case 16:
-            p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
             break;
         case 24:
-            p_dec->fmt_out.i_codec = AOUT_FMT_S24_NE;
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24N;
             break;
         default:
             msg_Dbg( p_dec, "strange bit/sample value: %d",
@@ -1316,7 +1316,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     FLAC__stream_encoder_set_sample_rate( p_sys->p_flac,
                                           p_enc->fmt_in.audio.i_rate );
     FLAC__stream_encoder_set_bits_per_sample( p_sys->p_flac, 16 );
-    p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+    p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
 
     /* Get and store the STREAMINFO metadata block as a p_extra */
     p_sys->p_chain = 0;
index 0b9959bd9f3640ab51b56cf9fdb40470f04ed6d7..976c8c7202dca3f04868620ca86af5816be0fe05 100644 (file)
@@ -486,7 +486,7 @@ static int OpenAudio( decoder_t *p_dec )
     }
 
 
-    es_format_Init( &p_dec->fmt_out, AUDIO_ES, AOUT_FMT_S16_NE );
+    es_format_Init( &p_dec->fmt_out, AUDIO_ES, VLC_CODEC_S16N );
     p_dec->fmt_out.audio.i_rate = p_sys->OutputFormatInfo.sampleRate;
     p_dec->fmt_out.audio.i_channels = p_sys->OutputFormatInfo.numChannels;
     p_dec->fmt_out.audio.i_physical_channels =
index af169aacab40f2a8abc4c4ab9ec867f6b5b38707..b668b609fce5bbb1121b41f6b47ffd8134318289 100644 (file)
@@ -222,7 +222,7 @@ static int Open( vlc_object_t *p_this )
     if( p_sys->win32_dll ) Close( p_this );
 #endif
 
-    es_format_Init( &p_dec->fmt_out, AUDIO_ES, AOUT_FMT_S16_NE );
+    es_format_Init( &p_dec->fmt_out, AUDIO_ES, VLC_CODEC_S16N );
     p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
     p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels;
     p_dec->fmt_out.audio.i_bitspersample =
index 1069f2d18923b331845dbdf3689f65d1f7a393e6..564a87c841e2085ea6aadb55ad12d5f6dccb406e 100644 (file)
@@ -220,7 +220,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+    p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
 
     /*
       Set callbacks
@@ -940,7 +940,7 @@ static int OpenEncoder( vlc_object_t *p_this )
         return VLC_ENOMEM;
     p_enc->p_sys = p_sys;
     p_enc->pf_encode_audio = Encode;
-    p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+    p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
     p_enc->fmt_out.i_codec = VLC_CODEC_SPEEX;
 
     speex_init_header( &p_sys->header, p_enc->fmt_in.audio.i_rate,
index 6f2caf425111def7a42c7dc7aa52d9184f7b5697..6a3f33e890ce6a1f48cb8a10212d124fa0818ce7 100644 (file)
@@ -164,7 +164,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->p_sys = p_sys;
 
     p_enc->pf_encode_audio = Encode;
-    p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+    p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
 
     p_enc->fmt_out.i_cat = AUDIO_ES;
     p_enc->fmt_out.i_codec = VLC_CODEC_MPGA;
index 12fa0cc55505d2d8f2633701de2ea30cc47cec97..6c9a6d8c4d012ad1c01e0590ed4ca094a8a486e7 100644 (file)
@@ -141,7 +141,7 @@ int OpenAudio( vlc_object_t *p_this )
     }
     pp.format.voices         = i_nb_channels;
 
-    p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+    p_aout->output.output.i_format = VLC_CODEC_S16N;
     p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE;
     pp.format.format = SND_PCM_SFMT_S16;
     i_bytes_per_sample = 2;