]> git.alsa-project.org Git - alsa-plugins.git/commit
jack: Report Xruns to user application
authorTimo Wischer <twischer@de.adit-jv.com>
Fri, 16 Mar 2018 14:23:32 +0000 (15:23 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 16 Mar 2018 14:27:00 +0000 (15:27 +0100)
commita08336cd889512dd3f1060c68724ab81f15fb21c
tree5e50ba7000d302e309e7a261fc71c7feb21a4531
parent626b5a468d1bc0e4fe5eeffc745a8105dbee1d97
jack: Report Xruns to user application

Only increasing the hw_ptr is not sufficient
because it will not be evaluated by the ALSA library
to detect an Xrun.

In addition there is a raise where an Xrun detected by the JACK thread
could not be detected in the ALSA thread.
- In playback use case
- The hw_ptr will be increased by the JACK thread
  (hw_ptr > appl_ptr => Xrun)
- But the ALSA thread increases the appl_ptr before evaluating the
hw_ptr
- Therefore the hw_ptr < appl_ptr again
- ALSA will not detect the Xrun which was already detected by the
JACK thread

Therefore an additional variable is required to report an Xrun from the
JACK thread to ALSA.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
jack/pcm_jack.c