Jump to content
  • Advertisement
Sign in to follow this  
hojjatjafary

FMOD C# api crash

This topic is 1602 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
I'm trying to implement an interactive music system using FMOD Designer C# api, I used the event system without any problem, but when I try to get music cues it crashes.

    FMOD.RESULT result;
    ERRCHECK(result = eventsystem.getMusicSystem(ref musicSystem));
     
    FMOD.MUSIC_ITERATOR iter = new FMOD.MUSIC_ITERATOR();
     
    ERRCHECK(musicSystem.getCues(ref iter, "myFilter"));     // Crash !!!

Is there anyone master in P/Invoke that can help me to find a solution to this annoying problem?

Edited by Hojjat

Share this post


Link to post
Share on other sites
Advertisement

Found my solution, I was iterating through a generic List of string containing music cue names to get cue iterator, a List<string> musicCueNames, like this :

ERRCHECK(musicSystem.getCues(ref iter, musicCueNames[i])); // Crash!

I changed it to something like this :
 


string cueName = musicCueNames[i];
ERRCHECK(musicSystem.getCues(ref iter, cueName)); // Works!

and now everything works properly, but don't know exactly why.

Edited by Hojjat

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!