FMOD DSP callback length differs between Linux and OSX


(Angel) #1

Hi there
I have a pass thru DSP so that I can retrieve mixed audio bytes in my application. I’ve noticed that the DSP callback’s length parameter (and hence the in and out buffer lengths)
callback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, <-- this is the length in question int inchannels, int *outchannels)

is different, depending on whether I’m running on OSX or Linux.
For OSX, the length is 512, for Linux, it is 1024.

I’m running the DSP in NRT, this difference in length affects the number of times I can call System.update()

Is there any way to fix the length such that both operating systems will return the same length?


(Nicholas Wilcox) #2

Use FMOD::System::setDSPBufferSize() http://52.88.2.202/documentation/#content/generated/FMOD_System_SetDSPBufferSize.html


(Angel) #3

Thanks for the help! I actually had that set, but accidentally had it set after sys init, hence it wasn’t taking hold. Your answer prompted me to relook the method. Thanks again!