Commit 6006bd36 authored by Thomas Guillem's avatar Thomas Guillem

audiotrack: use input sample rate when using spdif

parent c0638f45
......@@ -847,6 +847,12 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
p_sys->fmt.i_original_channels = p_sys->fmt.i_physical_channels;
if( b_spdif )
{
i_native_rate = p_sys->fmt.i_rate;
}
else
{
i_native_rate = JNI_AT_CALL_STATIC_INT( getNativeOutputSampleRate,
jfields.AudioManager.STREAM_MUSIC );
if( i_native_rate <= 0 )
......@@ -854,6 +860,7 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
msg_Warn( p_aout, "negative native rate ? Should not happen !" );
i_native_rate = VLC_CLIP( p_sys->fmt.i_rate, 4000, 48000 );
}
}
/* We can only accept U8, S16N, FL32, and AC3 */
switch( p_sys->fmt.i_format )
......
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