mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
ringbuffer: simplify the API
Use absolute indexes that we let wrap around. We can then easily detect how much we under of overflowed by using serial number arithmetic. Remove the Areas, we can trivially compute this ourselves, move the logic in read/write_data.
This commit is contained in:
parent
90ea120d3c
commit
0b508db9fc
6 changed files with 107 additions and 138 deletions
|
|
@ -120,7 +120,6 @@ spa_debug_buffer (const SpaBuffer *buffer)
|
|||
fprintf (stderr, " writeindex: %d\n", h->ringbuffer.writeindex);
|
||||
fprintf (stderr, " size: %d\n", h->ringbuffer.size);
|
||||
fprintf (stderr, " mask: %d\n", h->ringbuffer.mask);
|
||||
fprintf (stderr, " mask2: %d\n", h->ringbuffer.mask2);
|
||||
break;
|
||||
}
|
||||
case SPA_META_TYPE_SHARED:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue