Re: [LAD] Ring buffers again

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Will Godfrey <willgodfrey@...>
Cc: linux-audio-dev@lists.linuxaudio.org <linux-audio-dev@...>
Date: Thursday, May 22, 2014 - 9:04 pm

--001a11c11e464b7ffd04fa03733b
Content-Type: text/plain; charset=UTF-8

On Thu, May 22, 2014 at 4:46 PM, Will Godfrey
wrote:

>

the jack ring buffers are byte-oriented, so you do have to be careful.
however, if both the reader and writer only ever increment their respective
pointer/index in multiples of the same basic byte count, then you should be
OK.

if you use a C++ template ring buffer, then you necessarily cannot get
partial transfers.

--001a11c11e464b7ffd04fa03733b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, May 22, 2014 at 4:46 PM, Will Godfrey &lt=
;willgodfr=
ey@musically.me.uk
> wrote:

As well as the jack ring buffer, I've looked at several others now, and=
their
example code. The most significant thing that seems to be different about t=
hem
(from a usage point of view) is the way they handle overflows. However, if =
the
buffer size is defined as an exact multiple of the data type/structure and =
only
complete structures are pushed or popped, would I be right in thinking that=
you
would only need to check on an all/none basis?

Have I missed something that could cause a partial data transfer?the jack ring buffers are byte-oriented, so you do have to =
be careful. however, if both the reader and writer only ever increment thei=
r respective pointer/index in multiples of the same basic byte count, then =
you should be OK.
if you use a C++ template ring buffer, then you necessarily =
cannot get partial transfers.

--001a11c11e464b7ffd04fa03733b--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Ring buffers again, Will Godfrey, (Thu May 22, 8:46 pm)
Re: [LAD] Ring buffers again, Paul Davis, (Thu May 22, 9:04 pm)
Re: [LAD] Ring buffers again, Will J Godfrey, (Fri May 23, 6:14 pm)