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

Support for variable block size #100

Closed
pierreguillot opened this issue Mar 16, 2018 · 4 comments
Closed

Support for variable block size #100

pierreguillot opened this issue Mar 16, 2018 · 4 comments
Labels
bug
Projects

Comments

@pierreguillot
Copy link
Owner

@pierreguillot pierreguillot commented Mar 16, 2018

From the JUCE documentation:

The number of samples in these buffers is NOT guaranteed to be the same for every
callback, and may be more or less than the estimated value given to prepareToPlay().
Your code must be able to cope with variable-sized blocks, or you're going to get
clicks and crashes!

That's not managed by the plugin and I guess that's why there are clicks or audio glitches when looping in Reaper (see this thread).

@pierreguillot pierreguillot added the bug label Mar 16, 2018
@pierreguillot pierreguillot added this to To do in v1.0.4 via automation Mar 16, 2018
@pierreguillot

This comment has been minimized.

Copy link
Owner Author

@pierreguillot pierreguillot commented Mar 17, 2018

After more tests on Reaper, it seems really necessary because sometimes the size of the block can really be any value. For the moment, the plugin can't crash even if the number of samples varies because the current version avoid to process when such cases happend but the perform method can lost some samples.

A good solution seems a bit complicated to implement and implies a minimum 64 samples of latency (pd block size) that can be compensated using the latency option of the plugin. So I guess it will also be the time to add a better support for a dynamic latency that could depends on the sample rate or whatever (see the suggestion by Alfonso #62). So the real latency of the plugin will be user-latency+pd-block-size.

@alfonso73

This comment has been minimized.

Copy link

@alfonso73 alfonso73 commented Mar 18, 2018

Hi,
@pierreguillot will we still be able to deal with block~ size of 1 sample?
This is very important for designing custom filters and generally speaking with any process involving some sort of feedback in the audio path.

@pierreguillot

This comment has been minimized.

Copy link
Owner Author

@pierreguillot pierreguillot commented Mar 18, 2018

Yes of course. It manages the audio signals between the DAW and the plugin but Pd internal audio management is unchanged.

@alfonso73

This comment has been minimized.

Copy link

@alfonso73 alfonso73 commented Mar 18, 2018

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1.0.4
  
Done
2 participants
You can’t perform that action at this time.