private void timer1_Tick(object sender, System.EventArgs e) { if (!initialised) { ERRCHECK(result = FMOD.Event_Factory.EventSystem_Create(ref eventsystem)); ERRCHECK(result = eventsystem.init(64, FMOD.INITFLAGS.NORMAL, (IntPtr)null, FMOD.EVENT_INITFLAGS.NORMAL)); ERRCHECK(result = eventsystem.setMediaPath("../../../../examples/media/")); ERRCHECK(result = eventsystem.load("examples.fev")); ERRCHECK(result = eventsystem.getEvent("examples/FeatureDemonstration/Basics/SimpleEvent", FMOD.EVENT_MODE.DEFAULT, ref evt)); initialised = true; } /* * "Main Loop" */ ERRCHECK(result = eventsystem.update()); if (eventstart) { ERRCHECK(evt.start()); } /* * Clean up and exit */ if (exit) { ERRCHECK(result = eventsystem.release()); Application.Exit(); } }