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

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));

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).

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.

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

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.