Ejemplo n.º 1
0
    public AKRESULT PostOnEvent(uint in_eventID, GameObject in_gameObjectID, uint in_uNumPosts)
    {
        var in_gameObjectID_id = AkSoundEngine.GetAkGameObjectID(in_gameObjectID);

        AkSoundEngine.PreGameObjectAPICall(in_gameObjectID, in_gameObjectID_id);

        {
            return((AKRESULT)AkSoundEnginePINVOKE.CSharp_AkMIDIPost_PostOnEvent(swigCPtr, in_eventID,
                                                                                in_gameObjectID_id, in_uNumPosts));
        }
    }
Ejemplo n.º 2
0
    public uint PostOnEvent(uint in_eventID, UnityEngine.GameObject in_gameObjectID, uint in_uNumPosts)
    {
        var in_gameObjectID_id = AkSoundEngine.GetAkGameObjectID(in_gameObjectID);

        AkSoundEngine.PreGameObjectAPICall(in_gameObjectID, in_gameObjectID_id);

        uint ret = PostOnEvent(in_eventID, in_gameObjectID_id, in_uNumPosts);

        AkCallbackManager.SetLastAddedPlayingID(ret);
        return(ret);
    }
Ejemplo n.º 3
0
    public bool Add(UnityEngine.GameObject in_listenerGameObj, uint in_AuxBusID, float in_fValue)
    {
        if (isFull)
        {
            return(false);
        }

        AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_Set(GetObjectPtr(m_Count), AkSoundEngine.GetAkGameObjectID(in_listenerGameObj), in_AuxBusID, in_fValue);
        m_Count++;
        return(true);
    }
Ejemplo n.º 4
0
    public AKRESULT GetGameObjectAuxSendValues(GameObject in_gameObjectID, ref uint io_ruNumSendValues)
    {
        var in_gameObjectID_id = AkSoundEngine.GetAkGameObjectID(in_gameObjectID);

        AkSoundEngine.PreGameObjectAPICall(in_gameObjectID, in_gameObjectID_id);

        {
            return((AKRESULT)AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_GetGameObjectAuxSendValues(swigCPtr,
                                                                                                   in_gameObjectID_id, ref io_ruNumSendValues));
        }
    }
Ejemplo n.º 5
0
    public uint PostOnEvent(uint in_eventID, UnityEngine.GameObject in_gameObjectID, uint in_uNumPosts, bool in_bAbsoluteOffsets, uint in_uFlags, AkCallbackManager.EventCallback in_pfnCallback, object in_pCookie)
    {
        var in_gameObjectID_id = AkSoundEngine.GetAkGameObjectID(in_gameObjectID);

        AkSoundEngine.PreGameObjectAPICall(in_gameObjectID, in_gameObjectID_id);

        uint ret = PostOnEvent(in_eventID, in_gameObjectID_id, in_uNumPosts, in_bAbsoluteOffsets, in_uFlags, in_pfnCallback, in_pCookie);

        AkCallbackManager.SetLastAddedPlayingID(ret);
        return(ret);
    }
    private void Awake()
    {
        var akGameObj = GetComponent <AkGameObj>();

        UnityEngine.Debug.Assert(akGameObj != null);
        if (akGameObj)
        {
            akGameObj.Register();
        }

        akGameObjectID = AkSoundEngine.GetAkGameObjectID(gameObject);
    }
Ejemplo n.º 7
0
    private void OnEnableEditorListener()
    {
        if (!Application.isPlaying && AkSoundEngine.IsInitialized())
        {
            AkSoundEngine.RegisterGameObj(gameObject, gameObject.name);

            var id = AkSoundEngine.GetAkGameObjectID(gameObject);
            AkSoundEnginePINVOKE.CSharp_AddDefaultListener(id);

            UnityEditor.EditorApplication.update += UpdateEditorListenerPosition;
        }
    }
Ejemplo n.º 8
0
    public bool IsSame(UnityEngine.GameObject listener, uint id)
    {
        var listener_id = AkSoundEngine.GetAkGameObjectID(listener);

        AkSoundEngine.PreGameObjectAPICall(listener, listener_id);

        {
            bool ret = AkSoundEnginePINVOKE.CSharp_AkAuxSendValueProxy_IsSame(swigCPtr, listener_id, id);

            return(ret);
        }
    }
Ejemplo n.º 9
0
    public void PostOnEvent(uint in_eventID, UnityEngine.GameObject gameObject, int count)
    {
        if (count >= m_Count)
        {
            throw new IndexOutOfRangeException("Out of range access in AkMIDIPostArray");
        }

        var gameObjectID = AkSoundEngine.GetAkGameObjectID(gameObject);

        AkSoundEngine.PreGameObjectAPICall(gameObject, gameObjectID);
        AkSoundEnginePINVOKE.CSharp_AkMIDIPost_PostOnEvent(m_Buffer, in_eventID, gameObjectID, (uint)count);
    }
Ejemplo n.º 10
0
    private void OnDisableEditorListener()
    {
        if (!Application.isPlaying && AkSoundEngine.IsInitialized())
        {
            UnityEditor.EditorApplication.update -= UpdateEditorListenerPosition;

            var id = AkSoundEngine.GetAkGameObjectID(gameObject);
            AkSoundEnginePINVOKE.CSharp_RemoveDefaultListener(id);

            AkSoundEngine.UnregisterGameObj(gameObject);
        }
    }
    private void OnEnableEditorListener(UnityEngine.GameObject gameObject)
    {
        if (!UnityEngine.Application.isPlaying && AkSoundEngine.IsInitialized() && editorListenerGameObject == null)
        {
            editorListenerGameObject = gameObject;

            AkSoundEngine.RegisterGameObj(editorListenerGameObject, editorListenerGameObject.name);

            // Do not create AkGameObj component when adding this listener
            var id = AkSoundEngine.GetAkGameObjectID(editorListenerGameObject);
            AkSoundEnginePINVOKE.CSharp_AddDefaultListener(id);

            UnityEditor.EditorApplication.update += UpdateEditorListenerPosition;
        }
    }
    private void OnDisableEditorListener()
    {
        if (IsPlayingOrIsNotInitialized || editorListenerGameObject == null)
        {
            return;
        }

        UnityEditor.EditorApplication.update -= UpdateEditorListenerPosition;

        var id = AkSoundEngine.GetAkGameObjectID(editorListenerGameObject);

        AkSoundEnginePINVOKE.CSharp_RemoveDefaultListener(id);

        AkSoundEngine.UnregisterGameObj(editorListenerGameObject);
        editorListenerGameObject = null;
    }
Ejemplo n.º 13
0
    public bool Contains(UnityEngine.GameObject in_listenerGameObj, uint in_AuxBusID)
    {
        if (m_Buffer == IntPtr.Zero)
        {
            return(false);
        }

        for (int i = 0; i < m_Count; i++)
        {
            if (AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_IsSame(GetObjectPtr(i), AkSoundEngine.GetAkGameObjectID(in_listenerGameObj), in_AuxBusID))
            {
                return(true);
            }
        }

        return(false);
    }
    private void OnEnableEditorListener(UnityEngine.GameObject gameObject)
    {
        if (IsPlayingOrIsNotInitialized || editorListenerGameObject != null)
        {
            return;
        }

        editorListenerGameObject = gameObject;
        AkSoundEngine.RegisterGameObj(editorListenerGameObject, editorListenerGameObject.name);

        // Do not create AkGameObj component when adding this listener
        var id = AkSoundEngine.GetAkGameObjectID(editorListenerGameObject);

        AkSoundEngine.AddDefaultListener(id);

        UnityEditor.EditorApplication.update += UpdateEditorListenerPosition;
    }
    private void OnEnableEditorListener(UnityEngine.GameObject gameObject)
    {
        if (!UnityEngine.Application.isPlaying && AkSoundEngine.IsInitialized() && editorListenerGameObject == null)
        {
            editorListenerGameObject = gameObject;

            // Clearing the isDirty flag of the AkAudioListener list.
            AkAudioListener.DefaultListeners.Refresh();

            AkSoundEngine.RegisterGameObj(editorListenerGameObject, editorListenerGameObject.name);

            var id = AkSoundEngine.GetAkGameObjectID(editorListenerGameObject);
            AkSoundEnginePINVOKE.CSharp_AddDefaultListener(id);

            UnityEditor.EditorApplication.update += UpdateEditorListenerPosition;
        }
    }
Ejemplo n.º 16
0
    public AKRESULT GetValues(UnityEngine.GameObject gameObject)
    {
        uint     count = MAX_COUNT;
        AKRESULT res   = (AKRESULT)AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_GetGameObjectAuxSendValues(m_Buffer, AkSoundEngine.GetAkGameObjectID(gameObject), ref count);

        m_Count = (int)count;
        return(res);
    }
Ejemplo n.º 17
0
 public AKRESULT SetValues(UnityEngine.GameObject gameObject)
 {
     return((AKRESULT)AkSoundEnginePINVOKE.CSharp_AkAuxSendValue_SetGameObjectAuxSendValues(m_Buffer, AkSoundEngine.GetAkGameObjectID(gameObject), (uint)m_Count));
 }
Ejemplo n.º 18
0
 public void SetGameObjectRadius(float in_outerRadius, float in_innerRadius)
 {
     AkSoundEngine.SetGameObjectRadius(AkSoundEngine.GetAkGameObjectID(gameObject), in_outerRadius, in_innerRadius);
 }
Ejemplo n.º 19
0
 public void SetGameObjectRadius()
 {
     AkSoundEngine.SetGameObjectRadius(AkSoundEngine.GetAkGameObjectID(gameObject), outerRadius, innerRadius);
 }
Ejemplo n.º 20
0
 public void SetGameObjectRadius(UnityEngine.GameObject in_gameObject)
 {
     AkSoundEngine.SetGameObjectRadius(AkSoundEngine.GetAkGameObjectID(in_gameObject), outerRadius, innerRadius);
 }
Ejemplo n.º 21
0
 private void Awake()
 {
     akGameObjectID = AkSoundEngine.GetAkGameObjectID(gameObject);
     SetIsDefaultListener_NoCheck(isDefaultListener);
 }
Ejemplo n.º 22
0
 /// Access the room's ID
 public ulong GetID()
 {
     return(AkSoundEngine.GetAkGameObjectID(gameObject));
 }