Open matheusmortatti opened 4 years ago
Using dynamic size for the audio buffer size is a really bad idea, it can impact the audio quality a lot. I do not recommend changing it.
It needs to at least support it because that's how Unity works. It gives you a buffer for you to fill out that can change sizes between calls. I believe it doesn't change sizes often though, so it won't be a super big quality impact.
Outside the P8 API, I believe it's better to have multiple function signatures instead of having parameters with default values. That makes the code more usable and readable.
An example is tie RequestBuffer function in AudioUnit. It should have one signature without any value, using the default samplePerBuffer value, and another one where you could specify the buffer size requested.