Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


FMOD C# api crash


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Hojjat   Members   -  Reputation: 241

Like
0Likes
Like

Posted 03 January 2014 - 06:44 AM

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, 03 January 2014 - 08:53 AM.


Sponsor:

#2 Hojjat   Members   -  Reputation: 241

Like
0Likes
Like

Posted 06 January 2014 - 09:04 AM

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, 06 January 2014 - 02:07 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS