]> git.alsa-project.org Git - alsa-lib.git/commit
rate: handle negative values from snd_pcm_mmap_playback_hw_avail
authorAlexander E. Patrakov <patrakov@gmail.com>
Sat, 13 Sep 2014 18:30:18 +0000 (00:30 +0600)
committerJaroslav Kysela <perex@perex.cz>
Sat, 13 Sep 2014 19:05:04 +0000 (21:05 +0200)
commitff9d213ff80f6fe0456565d4f524366443217174
treef501f41f2f0ae03de9ac173860dabc8d08136a42
parent4fafa468d4bb4618cfde7183f820d8fdd373dcb1
rate: handle negative values from snd_pcm_mmap_playback_hw_avail

Such negative returns are possible during an underrun if xrun detection
is disabled.

So, don't store the result in an unsigned variable (where it will
overflow), and postpone the trigger in such case, too.

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_rate.c