Fons Adriaensen wrote:
I don't see why it's fragile. There's no reason for the compiler to modify
rb->read_ptr if not asked to. Buf if that's the case, because of some sort of
dark voodoo optimization, then we could use a temporary variable to hold the
intermediary result. Better, all computation could be done on this temporary
variable and transfered into rb->read_ptr once finished, so that modifying the
later only involves memory copy.
> One real solution is to *not* use the size_mask
You class looks good, but some work is needed to provide a Jack backward
compatible API based on it.
IMO, one important thing is to include unit/regression tests, for the ringbuffer
as well as general Jack operation, in the official jack distribution, that one
can run with a simple "make test". I'll try to do this for this test suite I
wrote, once cleaned up.
Olivier Guilyardi / Samalyse
Linux-audio-user mailing list