11 Commits

Author SHA1 Message Date
Chris Robinson
21a17620e3 Fix the ringbuffer write limit
Previously it just limited the returned write space, irrespective of how much
had already been written. The buffer could still be filled up by doing multiple
writes. Now the size is limited by adjusting the read pointer by the real vs
limited difference when calculating the writable space.
2019-01-03 15:54:18 -08:00
Chris Robinson
1a4387d137 Return unique_ptrs instead of raw pointers
For the ring buffer, channel converter, and sample converter.
2018-12-27 12:55:43 -08:00
Chris Robinson
8a0295503d Clean up the ring buffer struct and use member functions 2018-12-26 21:22:17 -08:00
Chris Robinson
10ce121dbd Use a normal delete instead of ll_ringbuffer_free
And use RingBufferPtr in more places
2018-12-22 11:38:38 -08:00
Chris Robinson
0116e763ea Add a unique_ptr alias for the ringbuffer 2018-11-27 19:49:45 -08:00
Chris Robinson
ad5f9d9b22 Return the ringbuffer data pointers as a pair 2018-11-19 04:46:49 -08:00
Chris Robinson
a14f39ea06 Make ll_ringbuffer_write/read take void*/const void* 2018-11-19 04:11:21 -08:00
Chris Robinson
30821e978b Add extern "C" to some headers 2018-03-09 17:24:03 -08:00
Chris Robinson
03274a5b95 Ensure at least the specified ringbuffer size is writable
Previously, all but one of the specified size could be written (so for a size
of n, only n-1 was guaranteed writable). All users pretty much compensated for
this, but it makes more sense to fix it at the source.
2018-03-02 13:01:11 -08:00
Chris Robinson
6f62fed65c Add an option to limit the write size of the ringbuffer 2018-03-01 21:23:13 -08:00
Chris Robinson
3832b25f30 Move the ringbuffer declarations to a separate header
And rename alcRing.c to ringbuffer.c for consistency.
2018-01-11 09:16:28 -08:00