Commit bcd01c48 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout: use S16N rather than S16L in audio outputs

(In practice, all of these were only used in little endian anyway.)
parent dbbb4fad
......@@ -108,7 +108,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
if (status != noErr)
return VLC_EGENERIC;
fmt->i_format = VLC_CODEC_S16L;
fmt->i_format = VLC_CODEC_S16N;
fmt->i_physical_channels = AOUT_CHANS_STEREO;
fmt->i_rate = 44100;
aout_FormatPrepare(fmt);
......
......@@ -239,10 +239,10 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
stream_type = MUSIC;
/* We can only accept U8 and S16L */
if (fmt->i_format != VLC_CODEC_U8 && fmt->i_format != VLC_CODEC_S16L)
fmt->i_format = VLC_CODEC_S16L;
format = (fmt->i_format == VLC_CODEC_S16L) ? PCM_16_BIT : PCM_8_BIT;
/* We can only accept U8 and S16N */
if (fmt->i_format != VLC_CODEC_U8 && fmt->i_format != VLC_CODEC_S16N)
fmt->i_format = VLC_CODEC_S16N;
format = (fmt->i_format == VLC_CODEC_S16N) ? PCM_16_BIT : PCM_8_BIT;
/* TODO: android supports more channels */
fmt->i_original_channels = fmt->i_physical_channels;
......
......@@ -708,7 +708,7 @@ static int CreateDSBuffer( audio_output_t *p_aout, int i_format,
waveformat.SubFormat = _KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
break;
case VLC_CODEC_S16L:
case VLC_CODEC_S16N:
waveformat.Format.wBitsPerSample = 16;
waveformat.Samples.wValidBitsPerSample =
waveformat.Format.wBitsPerSample;
......@@ -816,7 +816,7 @@ static int CreateDSBufferPCM( audio_output_t *p_aout, vlc_fourcc_t *i_format,
(i_rate / 20) * 4 * i_nb_channels, b_probe )
!= VLC_SUCCESS )
{
if ( CreateDSBuffer( p_aout, VLC_CODEC_S16L,
if ( CreateDSBuffer( p_aout, VLC_CODEC_S16N,
i_channels, i_nb_channels, i_rate,
(i_rate / 20) * 2 * i_nb_channels, b_probe )
!= VLC_SUCCESS )
......@@ -825,7 +825,7 @@ static int CreateDSBufferPCM( audio_output_t *p_aout, vlc_fourcc_t *i_format,
}
else
{
*i_format = VLC_CODEC_S16L;
*i_format = VLC_CODEC_S16N;
return VLC_SUCCESS;
}
}
......
......@@ -149,8 +149,8 @@ static int Start ( audio_output_t *p_aout, audio_sample_format_t *fmt )
= AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
}
/* Support s16l only */
format.i_format = VLC_CODEC_S16L;
/* Support S16 only */
format.i_format = VLC_CODEC_S16N;
aout_FormatPrepare( &format );
......
......@@ -448,8 +448,8 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_sys->p_buffer_chain = NULL;
p_sys->pp_buffer_last = &p_sys->p_buffer_chain;
// we want 16bit signed data little endian.
fmt->i_format = VLC_CODEC_S16L;
// we want 16bit signed data native endian.
fmt->i_format = VLC_CODEC_S16N;
fmt->i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
p_aout->play = Play;
p_aout->pause = Pause;
......
......@@ -575,7 +575,7 @@ static int OpenWaveOut( audio_output_t *p_aout, uint32_t i_device_id, int i_form
waveformat.SubFormat = __KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
break;
case VLC_CODEC_S16L:
case VLC_CODEC_S16N:
waveformat.Format.wBitsPerSample = 16;
waveformat.Samples.wValidBitsPerSample =
waveformat.Format.wBitsPerSample;
......@@ -675,7 +675,7 @@ static int OpenWaveOutPCM( audio_output_t *p_aout, uint32_t i_device_id,
i_channels, i_nb_channels, i_rate, b_probe )
!= VLC_SUCCESS )
{
if ( OpenWaveOut( p_aout, i_device_id, VLC_CODEC_S16L,
if ( OpenWaveOut( p_aout, i_device_id, VLC_CODEC_S16N,
i_channels, i_nb_channels, i_rate, b_probe )
!= VLC_SUCCESS )
{
......@@ -683,7 +683,7 @@ static int OpenWaveOutPCM( audio_output_t *p_aout, uint32_t i_device_id,
}
else
{
*i_format = VLC_CODEC_S16L;
*i_format = VLC_CODEC_S16N;
return VLC_SUCCESS;
}
}
......
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