mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
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>
This commit is contained in:
parent
1de6f99c7d
commit
e2d9e41174
9 changed files with 55 additions and 10 deletions
|
|
@ -498,6 +498,13 @@ typedef union _snd_pcm_sync_id {
|
|||
unsigned int id32[4];
|
||||
} snd_pcm_sync_id_t;
|
||||
|
||||
/** Infinite wait for snd_pcm_wait() */
|
||||
#define SND_PCM_WAIT_INFINITE (-1)
|
||||
/** Wait for next i/o in snd_pcm_wait() */
|
||||
#define SND_PCM_WAIT_IO (-10001)
|
||||
/** Wait for drain in snd_pcm_wait() */
|
||||
#define SND_PCM_WAIT_DRAIN (-10002)
|
||||
|
||||
/** #SND_PCM_TYPE_METER scope handle */
|
||||
typedef struct _snd_pcm_scope snd_pcm_scope_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue