# Studio::System::setAdvancedSettings() / getAdvancedSettings() not working in 1.5

**URL:** <https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634>\
**Category:** FMOD Engine\
**Created:** [September 10, 2014, 9:19am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634 "2014-09-10T09:19:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinrobinson1](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@martinrobinson1](https://qa.fmod.com/u/martinrobinson1)\
**Post date:** [September 10, 2014, 9:19am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/1 "2014-09-10T09:19:13Z")

</div>

This was working in 1.4 but in API 1.5 Studio::System::setAdvancedSettings() is now returning an error 31 (invalid parameter) and Studio::System::getAdvancedSettings() is returning an zero’d structure (not sure if that’s right given the docs for the default values).

```
	ERRCHECK (Studio::System::create (&system));
    ERRCHECK (system->getLowLevelSystem (&lowlevel));

    FMOD_ADVANCEDSETTINGS lowlevelSettings;
    memset (&lowlevelSettings, 0, sizeof(FMOD_ADVANCEDSETTINGS));
    lowlevelSettings.cbSize = sizeof(FMOD_ADVANCEDSETTINGS);
    ERRCHECK (lowlevel->getAdvancedSettings (&lowlevelSettings));
    lowlevelSettings.commandQueueSize = 32768;
    ERRCHECK (lowlevel->setAdvancedSettings (&lowlevelSettings));

    FMOD_STUDIO_ADVANCEDSETTINGS studioSettings;
    memset (&studioSettings, 0, sizeof(FMOD_STUDIO_ADVANCEDSETTINGS));
    studioSettings.cbSize = sizeof(FMOD_STUDIO_ADVANCEDSETTINGS);
    ERRCHECK (system->getAdvancedSettings (&studioSettings));
    studioSettings.commandQueueSize = 65536;
    ERRCHECK (system->setAdvancedSettings (&studioSettings));
```

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://qa.fmod.com/u/Guest)\
**Post date:** [September 11, 2014, 9:06am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/2 "2014-09-11T09:06:54Z")

</div>

Thanks for the report. These issues have been fixed for the next release.

---

<div class="post-metadata">

**Author:** ![martinrobinson1](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@martinrobinson1](https://qa.fmod.com/u/martinrobinson1)\
**Post date:** [September 11, 2014, 9:10am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/3 "2014-09-11T09:10:26Z")

</div>

> [@](#):
>
> Thanks for the report. These issues have been fixed for the next release.

Thanks, I have found a work around to avoid the error by setting the cbSize just before Studio::System::setAdvancedSettings() too (not documented as required). Although I’m not certain it is actaully working as I’m getting many warnings in the log that the command buffer is full (ther reason I’m setting the advanced settings).

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [September 12, 2014, 4:59am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/4 "2014-09-12T04:59:16Z")

</div>

You can call Studio::System::getBufferUsage and look at the studioCommandQueue field’s peakUsage and capacity. If you are issuing lots of commands between each system update you may find that 64KB isn’t enough.

You could set it to something very high (several meg) and then have a look at what the peak usage is in your case.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://qa.fmod.com/u/Guest)\
**Post date:** [September 12, 2014, 5:09am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/5 "2014-09-12T05:09:01Z")

</div>

Thanks for the cbSize documentation bug report - I’ve fixed it for the next release.

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [September 12, 2014, 5:03am UTC](https://qa.fmod.com/t/studio-setadvancedsettings-getadvancedsettings-not-working-in-1-5/11634/6 "2014-09-12T05:03:16Z")

</div>

Another thing to note is that Studio::System::setAdvancedSettings default fields can be left at zero, so there is no real need to call Studio::System::getAdvancedSettings first.
