Re: [PATCH - JACK PCM plugin] jack: Use boundary as hw_ptr wrap around

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Jan 2018 12:49:05 +0100,
<twischer@xxxxxxxxxxxxxx> wrote:
> 
> From: Timo Wischer <twischer@xxxxxxxxxxxxxx>
> 
> instead of using buffer_size as wrap around.

No, the ioplug backend has to report the position from 0 to
buffer_size.

> This is required to detect Xruns.

The XRUN can be reported back from the backend just by returning an
error from pointer callback.

> 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.

This has nothing to do with the reported position.  If this happens,
it simply means an XRUN.  You should report the error instead.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux