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

ALSA: force small period to avoid latency problems

This is as already done a long time ago for PulseAudio. VLC might
deliver audio a long time ahead, but there is no warranty thereof.
So a small latency must be assumed for the worst case.
(cherry picked from commit 894b9dfb)
parent 13f28a4e
......@@ -443,7 +443,7 @@ static int Open (vlc_object_t *obj)
msg_Err (aout, "cannot set buffer duration: %s", snd_strerror (val));
goto error;
}
#if 1
#if 0
val = snd_pcm_hw_params_get_buffer_time (hw, &param, NULL);
if (val)
{
......@@ -452,7 +452,7 @@ static int Open (vlc_object_t *obj)
}
else
param /= 2;
#else /* work-around for PulseAudio: */
#else /* work-around for period-long latency outputs (e.g. PulseAudio): */
param = AOUT_MIN_PREPARE_TIME;
#endif
val = snd_pcm_hw_params_set_period_time_near (pcm, hw, &param, NULL);
......
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