You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows to avoid memmove after each consume_cbuff_data.
Some extra care was necessary to round queue transactions to a multiple
of the sample size.
I also did some refactoring on the cbuff to allow it to grow and on the
resamplers to allw them to report not only how many bytes were consumed,
but also how many bytes were produced, so we can move cbuff pointers
accordingly.
tail/head methods reports the available sizes in 2 parameters :
"available" for the first chunk size, and "extra" for the optional
second chunk (which starts at the buffer beginning).
It's up to the caller to split it's contiguous accesses around these two
chunks.
Another method that I initially wanted to try was the virtual memory
trick to mirror the beggining of the buffer at the end of itself. But
this trick requires some code specific platform and can be tricky when
we need to grow the buffer. So I went this explicit 2 chunk approach
which is simpler and doesn't require platform specific code.
0 commit comments