Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public FmodMusicSystem getMusicSystem()
 {
     if (m_musicSystem == null)
     {
         if (m_eventSystem == null)
         {
         }
         FMOD.MusicSystem musicSystem = null;
         FMOD.RESULT      result      = m_eventSystem.getMusicSystem(ref musicSystem);
         ERRCHECK(result);
         m_musicSystem = new FmodMusicSystem(musicSystem);
     }
     return(m_musicSystem);
 }