Ejemplo n.º 1
0
    private void clean(bool checkForHandles)
    {
        int nbEventSystemHandles = FmodEventSystemHandle.NbHandles;
        if (m_eventSystem != null &&
            (checkForHandles == false || nbEventSystemHandles <= 1)) {

            List<FmodEventAudioSource> tmpList = m_eventPoolManager.getAllActiveSources();
            foreach (FmodEventAudioSource src in tmpList) {
                if (src != null) {
                    src.Clean();
                }
            }
            if (m_musicSystem != null) {
                m_musicSystem.release();
                m_musicSystem = null;
            }
            if (_unloadAllFiles()) {
                ERRCHECK(m_eventSystem.unload());
            }
            if (m_eventSystem != null) {
                ERRCHECK(m_eventSystem.release());
                m_eventSystem = null;
            }

            if (m_system != null) {
                ERRCHECK(m_system.release());
                m_system = null;
            }

            m_eventSystemWasCleaned = true;
            m_eventSystemWasInit = false;
            WasCleaned = true;
            FmodEventSystem.m_FmodEventSystem = null;
        }
    }
Ejemplo n.º 2
0
        public static RESULT EventSystem_Create(ref EventSystem eventsystem)
        {
            #if WIN64
            if (IntPtr.Size != 8)
            {
                /* Attempting to use 64-bit FMOD dll with 32-bit application.*/

                return RESULT.ERR_FILE_BAD;
            }
            #else
            if (IntPtr.Size != 4)
            {
                /* Attempting to use 32-bit FMOD dll with 64-bit application. A likely cause of this error
                 * is targetting platform 'Any CPU'. You cannot link to unmanaged dll with 'Any CPU'
                 * target.
                 *
                 * For 32-bit applications: set the platform to 'x86'.
                 *
                 * For 64-bit applications:
                 * 1. set the platform to x64
                 * 2. add the conditional complication symbol WIN64
                 * 3. download the win64 fmod release
                 * 4. copy the fmodex64.dll to the location of the .exe file for your application */

                return RESULT.ERR_FILE_BAD;
            }
            #endif

            RESULT      result           = RESULT.OK;
            IntPtr      eventsystemraw   = new IntPtr();
            EventSystem eventsystemnew   = null;

            result = FMOD_EventSystem_Create(ref eventsystemraw);
            if (result != RESULT.OK)
            {
                return result;
            }

            eventsystemnew = new EventSystem();
            eventsystemnew.setRaw(eventsystemraw);
            eventsystem = eventsystemnew;

            return result;
        }
Ejemplo n.º 3
0
 public static RESULT init(EventSystem eventsystem)
 {
     return FMOD_NetEventSystem_Init(eventsystem.getRaw(), EVENT_NET_PORT);
 }
Ejemplo n.º 4
0
 public static RESULT init(EventSystem eventsystem, ushort port)
 {
     return FMOD_NetEventSystem_Init(eventsystem.getRaw(), port);
 }
Ejemplo n.º 5
0
        public static RESULT EventSystem_Create(ref EventSystem eventsystem)
        {
            RESULT result = RESULT.OK;
            IntPtr eventsystemraw = new IntPtr();
            EventSystem eventsystemnew = null;

            result = FMOD_EventSystem_Create(ref eventsystemraw);
            if (result != RESULT.OK)
            {
                return result;
            }

            eventsystemnew = new EventSystem();
            eventsystemnew.setRaw(eventsystemraw);
            eventsystem = eventsystemnew;

            return result;
        }