public void Initialize() { result = FMOD.Event_Factory.EventSystem_Create(ref eventsystem); ERRCHECK(result); result = eventsystem.init(64, FMOD.INITFLAGS.NORMAL, (IntPtr)null, FMOD.EVENT_INITFLAGS.NORMAL); ERRCHECK(result); ERRCHECK(eventsystem.setMediaPath("./Media/")); ERRCHECK(result); ERRCHECK(eventsystem.load("BulletRebound.fev")); ERRCHECK(result); result = eventsystem.getMusicSystem(ref musicsystem); ERRCHECK(result); result = musicsystem.setVolume(1.0f); ERRCHECK(result); result = musicsystem.setMute(false); ERRCHECK(result); result = musicsystem.setPaused(false); ERRCHECK(result); result = musicsystem.prepareCue(MUSICCUE_BULLETREBOUND_TITLESCREEN, ref cue_titleScreen); ERRCHECK(result); result = musicsystem.prepareCue(MUSICCUE_BULLETREBOUND_MAIN, ref cue_main); ERRCHECK(result); result = musicsystem.prepareCue(MUSICCUE_BULLETREBOUND_GAMEOVER, ref cue_gameOver); ERRCHECK(result); }
public void loadMusicCue(FmodMusicCue cue) { if (m_musicSystem != null && !cue.isLoaded()) { FMOD.RESULT result = FMOD.RESULT.OK; FMOD.MusicPrompt prompt = new FMOD.MusicPrompt(); result = m_musicSystem.prepareCue((uint)cue.Id, ref prompt); if (result == FMOD.RESULT.OK) { cue.setMusicPrompt(prompt); } } }