Skip to content

Commit

Permalink
pcm: fix the documentation for snd_pcm_poll_descriptors again
Browse files Browse the repository at this point in the history
As noted in the github issue, the poll descriptors may change depending
on the stream parameters.

Fixes: cd04da2 ("pcm: clarify documentation of poll descriptor usage")
Fixes: #372
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
perexg committed Jan 2, 2024
1 parent 60d6fad commit d4992c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pcm/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,9 +1812,10 @@ static int __snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds,
* \link ::snd_pcm_poll_descriptors_revents() \endlink .
*
* It is guaranteed that for the given PCM handle, the output poll
* descriptor structs (and their count) will never change, thus it is
* valid to call the function once and reuse its output for the
* lifetime of the PCM device.
* descriptor structs (and their count) will not change after
* hardware and software parameters setup. Thus it is valid to call
* the function once when all parameters are set and reuse its output
* for the lifetime of the stream parameters.
*
* The function is thread-safe when built with the proper option.
*/
Expand Down

0 comments on commit d4992c3

Please sign in to comment.