Skip to content

Ringbuffer vs NBuffer #960

Answered by pschatzmann
Sobhan-Nami asked this question in Q&A
Discussion options

You must be logged in to vote

All buffers are working in the same way, that they can't write any data when the buffer is full. The difference is, that the Ringbuffer allocates 1 array and the NBuffer allocates n arrays: The NBuffer is just a flexible abstraction of e.g. a double buffer (when you define the number of buffers as 2)!

If you want to overwrite old data, this is simple: just check if you have enough free space to write and if not, read the amount that you want to be ignored, to free it up.

As an exception: the VariableSpeed related buffers however are working a bit different, but this is related to pitch shifting, which is another special topic.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sobhan-Nami
Comment options

Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants