Commit 4fcfd847 authored by Andy Tather's avatar Andy Tather Committed by Jean-Baptiste Kempf

Waveout: Fix SPDIF output

Ref #9522
parent 193af819
...@@ -175,12 +175,6 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt ) ...@@ -175,12 +175,6 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
/* Default behaviour is to use software gain */ /* Default behaviour is to use software gain */
p_aout->sys->b_soft = true; p_aout->sys->b_soft = true;
/*
check for configured audio device!
*/
fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
VLC_CODEC_FL32: VLC_CODEC_S16N;
char *dev = var_GetNonEmptyString( p_aout, "waveout-audio-device"); char *dev = var_GetNonEmptyString( p_aout, "waveout-audio-device");
uint32_t devid = findDeviceID( dev ); uint32_t devid = findDeviceID( dev );
...@@ -230,6 +224,12 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt ) ...@@ -230,6 +224,12 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
if( fmt->i_format != VLC_CODEC_SPDIFL ) if( fmt->i_format != VLC_CODEC_SPDIFL )
{ {
/*
check for configured audio device!
*/
fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
VLC_CODEC_FL32: VLC_CODEC_S16N;
int max_chan = var_InheritInteger( p_aout, "waveout-audio-channels"); int max_chan = var_InheritInteger( p_aout, "waveout-audio-channels");
int i_channels = aout_FormatNbChannels(fmt); int i_channels = aout_FormatNbChannels(fmt);
i_channels = ( i_channels < max_chan )? i_channels: max_chan; i_channels = ( i_channels < max_chan )? i_channels: max_chan;
......
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