Hi!
I have a problem with studio handles leak in 1.10.10 version. Seems that handles doesn’t release until there are any other instances of the same event exists.
For example I use Explosion
event from samples sound project shipped with API. It’s length is about 2 second and I spawn it in loop with 1 second interval. In previous versions of API I have 2-3 active event instances and is about 100 handles, but in 1.10.10 both instances count and handles are continiously grow until ‘spawning loop’ is not being stopped.
Code used to spawn event:
FMOD::Studio::EventInstance* instance = nullptr;
GDescription->createInstance(&instance);
instance->start();
instance->release();
Code used for checking instances and handles count:
int instancesCount = 0;
GDescription->getInstanceCount(&instancesCount);
FMOD_STUDIO_BUFFER_USAGE bufferUsage;
GFmodStudioSystem->getBufferUsage(&bufferUsage);
std::cout
<< "Instances count: " << std::dec << instancesCount << "\n"
<< "Handles count: " << bufferUsage.studiohandle.currentusage
<< std::endl;
I create a sample project with 2 configurations to demonstrate the issue:
- fmod-1.10.09 - works as expected
- fmod-1.10.10 - behaviour described above
After a bit research I found that problem is only with events contains at least one Single Instrument
inside it. If event consist of Multi Instrument
or Scatterer Instrument
all works as expected.