Releasing events event

Hi.
I’m trying to implement an audio system based on the FMOD Studio API examples, and i’m having issues with releasing any of my EventInstances.

I have everything working, and my sounds are playing fine, (including a looping music event), however if i start and immediately release an EventInstance, then I get an access exception. I’m effectively doing this (with additional result error checking of course)

    instance->start();
    instance->release();

If i don’t release the instance, then everything runs fine, however I assume that it’ll eventually run out of memory over time.

I’m checking and confirming that indeed the EventDescription is a OneShot event.

The same occurs if I stop and release a looping audio event, or ANY of my events for that matter.

I am working on iOS, and i get an “EXC_BAD_ACCESS” exception. It appears to be in the FMOD::AsyncManager::isInAnyAsyncThread() method.

Does anyone have any suggestions?

Thanks

What version of FMOD Studio runtime are you using?

I downloaded the latest a day or so ago: v1.04.04

It turns out I wasn’t linking the lib files correctly. I was missing the linker flags in my Xcode configuration.

Add “-lfmodL_$PLATFORM_NAME” and “-lfmodstudioL_$PLATFORM_NAME” to “Other Linker Flags” (in the “Linker” section)

It was weird because it appeared to be working fine even though I apparently wasn’t even linking the FMOD libs.

The post from markmarijnissen at http://52.88.2.202/questions/question/forum-39077 helped a lot on how to correctly set up FMOD in an Xcode project.