0
0

Hello,

I’ve been having so much trouble getting this to work, that I had to make an account for this forum.
I’ve been working on a project (using the FMOD api, of course), where the goal will be to stream procedurally generated music.
Therefore, I’d like my stream buffer size to be the size of the number of PCM samples in one bar (four beats) of 170bpm at 16bit 44100hz.
I’m having no trouble with the math, but no matter what I do, the datalen parameter in my pcmread callback defaults to 16384.

setStreamBufferSize() doesn’t seem to do anything. Same goes for the EXINFO structure members ‘decodebuffersize’ or ‘length’ (the latter of which, doesn’t have anything to do with the stream size AFAIK).

This seemingly simple problem has been driving me up the wall. There seems to be an unspoken rule that nobody is allowed to learn about how the buffer size is modified, and the few people that do know aren’t allow to tell.
Thanks for your time.

  • You must to post comments
0
0

the important part here is that your buffer size is set internally to what it should be, not that the callback should be passing that amount.
The callback is capped to save memory, so when you get 16384, then just wait for the next callback to get the remainder amount.

  • You must to post comments
0
0

Brett I love you.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.