-
Notifications
You must be signed in to change notification settings - Fork 140
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
Process single sample or block, return or replace inconsistency #59
Labels
polish
New feature or request
Comments
Agreed. For the most part, nearly all modules have a single-sample It would be great to clean this up for consistency, and yeah I think its a great idea for every module to have a |
Allright, I'll see if I can find some time to help out on this :) |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I was working on an improvement for the Compressor module, I noticed how some DSP modules have some sort of Process-method to work on a single sample and just return a single output sample. Some use ProcessBlock, some require the input by reference and work directly on the buffer while others work on a given output buffer.
This makes using the library somewhat difficult (sometimes using it inside your input loop in the AudioCallback, sometimes outside)
Now there is something to say for both of these, as processing a block reduces method calls by
blocksize
(I think? I'm somewhat new to DSP programming) but processing a single sample gives more flexibility.I would propose adding both options to all modules, if possible. And specifically for the ProcessBlock option: never work directly on the input buffer so that stays clean should the user wish to process that input though another module.
As long as a user doesn't use both single sample- and block-processing in a single AudioCallback, it should be fine, I think.
Would there be any problem with this?
The text was updated successfully, but these errors were encountered: