# setDSPBufferSize with recent 1.03.04 version

**URL:** <https://qa.fmod.com/t/setdspbuffersize-with-recent-1-03-04-version/11403>\
**Category:** FMOD Studio\
**Created:** [April 12, 2014, 10:42pm UTC](https://qa.fmod.com/t/setdspbuffersize-with-recent-1-03-04-version/11403 "2014-04-12T22:42:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlanquetot](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jlanquetot/32/24_2.png) [@jlanquetot](https://qa.fmod.com/u/jlanquetot)\
**Post date:** [April 12, 2014, 10:42pm UTC](https://qa.fmod.com/t/setdspbuffersize-with-recent-1-03-04-version/11403/1 "2014-04-12T22:42:14Z")

</div>

Hi,

I just upgraded to FMOD Studio 1.03.04 and was running on dec 2013 version before.  
When calling setDSPBufferSize(512,2), I am now getting the following error:“Cannot call this command after System::init.” And the sounds definitely seem to be lagging a lot on iOS.

Obviously I can’t move the call to setDSPBufferSize before the initialize call since the low level system doesn’t exist yet, so what would be the proper way of handling this.

Below the code that used to work.

```
    void *extraDriverData = 0;
    Common_Init(&extraDriverData);
    ERRCHECK( FMOD::Studio::System::create(&_system) );
    ERRCHECK( _system->initialize(32, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL, extraDriverData) );

    // <!-- l --><a class="postlink-local" href="http://52.88.2.202/forum/viewtopic.php?f=7&t=16135&p=54554&hilit=android#p54562">viewtopic.php?f=7&t=16135&p=54554&hilit=android#p54562</a><!-- l -->
    FMOD::System* lowLevelSystem = NULL;
    ERRCHECK( _system->getLowLevelSystem(&lowLevelSystem) );
    if( lowLevelSystem )
    {
        ERRCHECK( lowLevelSystem->setDSPBufferSize(512,2) );
    }
```

---

<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:** [April 14, 2014, 12:24am UTC](https://qa.fmod.com/t/setdspbuffersize-with-recent-1-03-04-version/11403/2 "2014-04-14T00:24:26Z")

</div>

You can call getLowLevelSystem() between create() and initialize().

setDSPBufferSize() has always needed to be called before initialize. I’m surprised it wasn’t returning an error code in earlier versions.
