Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No memmove #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

No memmove #36

wants to merge 1 commit into from

Commits on Feb 21, 2021

  1. Allow circular buffer to report disjoint buffer

    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.
    bsmiles32 committed Feb 21, 2021
    Configuration menu
    Copy the full SHA
    f0ac812 View commit details
    Browse the repository at this point in the history