Commit 81e768f8 authored by Thomas Guillem's avatar Thomas Guillem

aout: move code

This part is output specific
parent 07b2a6c6
......@@ -80,14 +80,6 @@ int aout_DecNew( audio_output_t *p_aout,
atomic_store (&owner->restart, 0);
owner->input_format = *p_format;
owner->mixer_format = owner->input_format;
if (p_format->channel_type == AUDIO_CHANNEL_TYPE_BITMAP
&& i_map_channels == 0)
{
/* The output channel map is unknown, use the WAVE one. */
assert(owner->mixer_format.i_channels > 0);
aout_SetWavePhysicalChannels(&owner->mixer_format);
}
owner->request_vout = *p_request_vout;
var_Change (p_aout, "stereo-mode", VLC_VAR_SETVALUE,
......
......@@ -484,7 +484,16 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
* and the ideal audio format would be the output of the filters chain.
* But that scheme would not really play well with digital pass-through. */
if (AOUT_FMT_LINEAR(fmt))
{ /* Try to stay in integer domain if possible for no/slow FPU. */
{
if (fmt->channel_type == AUDIO_CHANNEL_TYPE_BITMAP
&& aout_FormatNbChannels(fmt) == 0)
{
/* The output channel map is unknown, use the WAVE one. */
assert(fmt->i_channels > 0);
aout_SetWavePhysicalChannels(fmt);
}
/* Try to stay in integer domain if possible for no/slow FPU. */
fmt->i_format = (fmt->i_bitspersample > 16) ? VLC_CODEC_FL32
: VLC_CODEC_S16N;
......
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