View Single Post
Old 01-21-2020, 12:31 AM   #7
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,046
Default

Quote:
Originally Posted by SaulT View Post
Okay, so I could have said something like "buf0 = 0; buf1 = buf0 + srate;" but instead I'm picking a predetermined range. Why is buf0 100k? Because I'm thinking of the worst case scenario - someone is in a 96 kHz samplerate and they pick a 1 second delay. We want our plugins to work anywhere from 22.05 kHz to 96 kHz samplerates, and what if we are trying to create a reverb with dozens of delay lines? We want to think ahead and plan for these things.
You could also have stored the samples interleaved (i.e. 0, 1, 0, 1, 0, 1, ...). That way you don't have to worry about buf0 and buf1 overlapping, even beyond 96 kHz.
Tale is offline   Reply With Quote