Sign in to follow this  

FMOD C# api crash

This topic is 1437 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

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

This topic is 1437 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this