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

Safe use of buffer size setting #6

Closed
jpcima opened this issue Aug 23, 2018 · 0 comments
Closed

Safe use of buffer size setting #6

jpcima opened this issue Aug 23, 2018 · 0 comments

Comments

@jpcima
Copy link
Owner

jpcima commented Aug 23, 2018

I must not trust the buffer size to give a maximum dimension to the internal buffers.

According to documentation of class juce::AudioProcessor

The maximumExpectedSamplesPerBlock value is a strong hint about the maximum number of samples that will be provided in each block. You may want to use this value to resize internal buffers. You should program defensively in case a buggy host exceeds this value. The actual block sizes that the host uses may be different each time the callback happens: completely variable block sizes can be expected from some hosts.

Which means, current code is going to crash the stupid hosts.
As solution, I can divide processing into smaller individual chunks equal of smaller to buffer size.

@jpcima jpcima closed this as completed in 91f83a6 Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant