diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/array.c | 2 | ||||
| -rw-r--r-- | src/ring_buffer.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/array.c b/src/array.c index 9b61cd9..6af0f40 100644 --- a/src/array.c +++ b/src/array.c @@ -35,7 +35,7 @@ al_array_at(arr, (arr).size++) = item; \ } while (0) -#define al_array_insert(arr, item, i) \ +#define al_array_insert(arr, i, item) \ do { \ if ((arr).size > i) { \ al_array_reserve(arr, (arr).size + 1); \ diff --git a/src/ring_buffer.c b/src/ring_buffer.c index eaff139..751ea4a 100644 --- a/src/ring_buffer.c +++ b/src/ring_buffer.c @@ -1,5 +1,6 @@ -#include "../include/al/lib.h" #include "../include/al/ring_buffer.h" +#include "../include/al/atomic.h" +#include "../include/al/lib.h" // https://github.com/MusicPlayerDaemon/MPD/blob/master/src/util/RingBuffer.hxx // https://andrea.lattuada.me/blog/2019/the-design-and-implementation-of-a-lock-free-ring-buffer-with-contiguous-reservations.html |