# FMOD DSP callback length differs between Linux and OSX

**URL:** <https://qa.fmod.com/t/fmod-dsp-callback-length-differs-between-linux-and-osx/11841>\
**Category:** FMOD Engine\
**Created:** [March 2, 2015, 6:35am UTC](https://qa.fmod.com/t/fmod-dsp-callback-length-differs-between-linux-and-osx/11841 "2015-03-02T06:35:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seraphiel](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@seraphiel](https://qa.fmod.com/u/seraphiel)\
**Post date:** [March 2, 2015, 6:35am UTC](https://qa.fmod.com/t/fmod-dsp-callback-length-differs-between-linux-and-osx/11841/1 "2015-03-02T06:35:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [March 2, 2015, 11:33pm UTC](https://qa.fmod.com/t/fmod-dsp-callback-length-differs-between-linux-and-osx/11841/2 "2015-03-02T23:33:04Z")

</div>

Use FMOD::System::setDSPBufferSize() [http://52.88.2.202/documentation/#content/generated/FMOD\_System\_SetDSPBufferSize.html](http://52.88.2.202/documentation/#content/generated/FMOD_System_SetDSPBufferSize.html)

---

<div class="post-metadata">

**Author:** ![seraphiel](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@seraphiel](https://qa.fmod.com/u/seraphiel)\
**Post date:** [March 3, 2015, 8:59am UTC](https://qa.fmod.com/t/fmod-dsp-callback-length-differs-between-linux-and-osx/11841/3 "2015-03-03T08:59:10Z")

</div>

> [@](#):
>
> Use FMOD::System::setDSPBufferSize() [http://52.88.2.202/documentation/#content/generated/FMOD\_System\_SetDSPBufferSize.html](http://52.88.2.202/documentation/#content/generated/FMOD_System_SetDSPBufferSize.html)

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!
