rdpsnd/alsa: reduce default audio latency.

This commit is contained in:
Vic Lee 2012-05-09 23:14:53 +08:00
parent e8144e4bdc
commit ac5c7cded3

View File

@ -75,7 +75,7 @@ static void rdpsnd_alsa_set_params(rdpsndAlsaPlugin* alsa)
snd_pcm_hw_params_set_channels_near(alsa->out_handle, hw_params,
&alsa->actual_channels);
if (alsa->latency < 0)
frames = alsa->actual_rate * 4; /* Default to 4-second buffer */
frames = alsa->actual_rate * 4 / 10; /* Default to 400ms buffer */
else
frames = alsa->latency * alsa->actual_rate * 2 / 1000; /* Double of the latency */
if (frames < alsa->actual_rate / 2)