Answered
0
0

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));
  • You must to post comments
Good Answer
0
0

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

  • Martin Robinson
    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).
  • Geoff Carlton
    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.
    • Guest
    • 2 years ago
    Thanks for the cbSize documentation bug report - I've fixed it for the next release.
  • You must to post comments
Good Answer
0
0

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.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.