&& ((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) \
#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 */
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;
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))
{
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;
}
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;
}
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;
}
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;
}
{
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;
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;
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;
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;
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;
#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
*****************************************************************************/
} 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 },
};
}
else
{
- i_vlc_pcm_format = AOUT_FMT_S16_NE;
+ i_vlc_pcm_format = VLC_CODEC_S16N;
i_snd_pcm_format = SND_PCM_FORMAT_S16;
}
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;
{
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 ) );
}
"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,
}
}
- 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;
}
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
}
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
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 =
}
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;
}
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;
}
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:
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;
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;
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
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
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 =
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",
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;
}
- 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 =
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 =
/* 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
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,
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;
}
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;