]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: improve handling for snd_pcm_wait()
authorJaroslav Kysela <perex@perex.cz>
Tue, 2 May 2023 14:56:49 +0000 (16:56 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 3 May 2023 13:59:15 +0000 (15:59 +0200)
commite2d9e411744dede5a71e04a107cdc0ab7c1d0ed9
tree412e10ce1479c1a860ace74209dd91bd86dbdf30
parent1de6f99c7d058634b5550fa59c01f3b6546f830a
pcm: improve handling for snd_pcm_wait()

The snd_pcm_wait() function is called also internally from
the various plugins to wait for the drain with -1 and from i/o
routines in pcm.c.

Define two special negative timeout values to distinguish the
drain and i/o wait and calculate the maximal timeout according
the wait place.

Fixes: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/pcm.h
src/pcm/pcm.c
src/pcm/pcm_dmix.c
src/pcm/pcm_dshare.c
src/pcm/pcm_dsnoop.c
src/pcm/pcm_ioplug.c
src/pcm/pcm_rate.c
src/pcm/pcm_share.c
src/pcm/pcm_shm.c