Commit cee16ae6 authored by Laurent Aimar's avatar Laurent Aimar

Replaced AOUT_FMT_*_NE/IE by by VLC_CODEC equivalents.

parent abf074a8
......@@ -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) \
......
......@@ -279,17 +279,29 @@
#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 */
......
......@@ -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))
{
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -36,17 +36,6 @@
#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 },
};
......
......@@ -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 ) );
}
......
......@@ -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,
......
......@@ -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;
......
......@@ -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
......
......@@ -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 =
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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 =
......
......@@ -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;
......
......@@ -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 =
......
......@@ -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 =
......
......@@ -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,
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment