mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -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
b0042cec71
commit
f29acfd0e0
4 changed files with 46 additions and 6 deletions
|
|
@ -802,7 +802,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->sink->sample_spec)) < 0)) {
|
||||
if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec, FALSE)) < 0)) {
|
||||
pa_log_warn("Failed to query DSP status data: %s", pa_alsa_strerror(err));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue