mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
alsa: work around slightly broken _delay implementations
Use snd_pcm_avail_delay() in pa_alsa_safe_delay() so that we can check the delay value against the avail value and patch it up when it looks invalid. Only do this for capture.
This commit is contained in:
parent
74c117f49f
commit
1c29f5582d
4 changed files with 46 additions and 6 deletions
|
|
@ -760,7 +760,7 @@ static void update_smoother(struct userdata *u) {
|
|||
|
||||
/* Let's update the time smoother */
|
||||
|
||||
if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->source->sample_spec)) < 0)) {
|
||||
if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->source->sample_spec, TRUE)) < 0)) {
|
||||
pa_log_warn("Failed to get delay: %s", pa_alsa_strerror(err));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue