[alsa-devel] [PATCH - JACK PCM plugin] jack: Use boundary as hw_ptr wrap around
Takashi Iwai
tiwai at suse.de
Sat Feb 24 11:43:36 CET 2018
On Fri, 23 Feb 2018 15:18:08 +0100,
<twischer at de.adit-jv.com> wrote:
>
> From: Timo Wischer <twischer at de.adit-jv.com>
>
> instead of using buffer_size as wrap around.
>
> This is required to detect Xruns.
>
> It is also required to allow the JACK thread
> to processes the whole ALSA audio buffer at once
> without calling snd_pcm_avail_update() in between.
>
> For example when the hw_ptr will be updated with
> hw_ptr += buffer_size
> and it is using the buffer_size as wrap around
> hw_ptr %= buffer_size
> would result in the same value as before the add operation.
>
> Due to that the user application would not recognize
> that the complete audio buffer was copied.
>
> Signed-off-by: Timo Wischer <twischer at de.adit-jv.com>
>
> ---
>
> Here the updated version which only returns
> hw_ptr >= buffer_size if supported
> by the ALSA library on compile time
Thanks, applied now together with your alsa-lib patch.
Takashi
More information about the Alsa-devel
mailing list