Title: FMOD Studio event not playing even with correct path

hi

Hi, I’m having trouble with a FMOD Studio event it’s not playing, and I don’t understand why.

I’m using a LoadAudioFiles function to get the path to my bank files, and it returns the correct path. I have successfully loaded both the .bank and .strings.bank files.

Here’s the code I use to load the banks: ```c++ FMOD::Studio::Bank* masterBank = nullptr;
FMOD::Studio::Bank* stringsBank = nullptr;

m_studioSystem->loadBankFile(LoadAudioFiles(“walkingAudio/Build/Desktop/walking.bank”).c_str(),
FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank);

m_studioSystem->loadBankFile(LoadAudioFiles(“walkingAudio/Build/Desktop/walking.strings.bank”).c_str(),
FMOD_STUDIO_LOAD_BANK_NORMAL, &stringsBank);```

And here’s the code I use to get and play the event:

FMOD::Studio::EventDescription* eventDesc = nullptr;
FMOD::Studio::EventInstance* eventInstance = nullptr;

m_studioSystem->getEvent(“event:/walking”, &eventDesc);
eventDesc->createInstance(&eventInstance);
eventInstance->start();
eventInstance->release();

Even though the path "event:/walking" is correct, the event still doesn’t play.

I’m using FMOD Studio API. Does anyone know why the event might not play despite the correct path?

Hi,

Thank you for sharing the information and code.

A few things to check:

  • Is the walking event 2D or 3D? If it is a 3D event, are you setting 3D attributes on the instance?
  • Are there any errors or warnings in your logs/output?
  • Are you checking the FMOD_RESULT returned by each call? Particularly loadBankFile,getEvent, createInstance, and start.

If you haven’t had a chance to look at our play_sound.cpp example, you can find it in the FMOD Studio API installation folder. For example, on Windows it is located at:
C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\examples

Hope this helps!