public RESULT getEventBySystemID(uint systemid, EVENT_MODE mode, ref Event _event)
        {
            RESULT result   = RESULT.OK;
            IntPtr eventraw = new IntPtr();
            Event eventnew  = null;

            try
            {
                result = FMOD_EventSystem_GetEventBySystemID(eventsystemraw, systemid, mode, ref eventraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (_event == null)
            {
                eventnew = new Event();
                eventnew.setRaw(eventraw);
                _event = eventnew;
            }
            else
            {
                _event.setRaw(eventraw);
            }

            return result;
        }
        public RESULT getEvent(string name, EVENT_MODE mode, ref Event _event)
        {
            RESULT result   = RESULT.OK;
            IntPtr eventraw = new IntPtr();
            Event  eventnew = null;

            try
            {
                result = FMOD_EventProject_GetEvent(eventprojectraw, name, mode, ref eventraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (_event == null)
            {
                eventnew = new Event();
                eventnew.setRaw(eventraw);
                _event = eventnew;
            }
            else
            {
                _event.setRaw(eventraw);
            }

            return result;
        }
        public RESULT getRealEvent(ref Event realevent)
        {
            RESULT result = RESULT.OK;
            IntPtr eventraw = new IntPtr();

            try
            {
                result = FMOD_EventQueueEntry_GetRealEvent(eventqueueentryraw, ref eventraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (realevent == null)
            {
                Event eventnew = new Event();
                eventnew.setRaw(eventraw);
                realevent = eventnew;
            }
            else
            {
                realevent.setRaw(eventraw);
            }

            return result;
        }
        public RESULT getEventByIndex(int index, EVENT_MODE mode, ref Event _event)
        {
            RESULT result   = RESULT.OK;
            IntPtr eventraw = new IntPtr();
            Event  eventnew = null;

            try
            {
                result = FMOD_EventGroup_GetEventByIndex(eventgroupraw, index, mode, ref eventraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (_event == null)
            {
                eventnew = new Event();
                eventnew.setRaw(eventraw);
                _event = eventnew;
            }
            else
            {
                _event.setRaw(eventraw);
            }

            return result;
        }