Esempio n. 1
0
        public static uint AuxSend(Vector3 pos, AkAuxSendArray array)
        {
            array.Reset();
            Zone z = Zone.Get(pos);

            if (z == null)
            {
                return(0);
            }
            else
            {
                uint count;
                switch (z.Reverb.Value)
                {
                case ReverbMode.Room:
                    array.Add(AK.AUX_BUSSES.REVERB, 1.0f);
                    count = 1;
                    break;

                case ReverbMode.Subtle:
                    array.Add(AK.AUX_BUSSES.REVERB_SUBTLE, 1.0f);
                    count = 1;
                    break;

                default:
                    count = 0;
                    break;
                }
                return(count);
            }
        }
    public void UpdateAuxSend(UnityEngine.GameObject gameObject, UnityEngine.Vector3 position)
    {
        if (!isDirty)
        {
            return;
        }

        auxSendValues.Reset();
        AddHighestPriorityEnvironmentsFromPortals(position);
        AddHighestPriorityEnvironments(position);

        AkSoundEngine.SetEmitterAuxSendValues(gameObject, auxSendValues, (uint)auxSendValues.Count());
        isDirty = false;
    }
Esempio n. 3
0
    public void UpdateAuxSend(GameObject gameObject, Vector3 position)
    {
        if (!isDirty)
        {
            return;
        }

        auxSendValues.Reset();
        AddHighestPriorityEnvironmentsFromPortals(position);
        AddHighestPriorityEnvironments(position);

        AkSoundEngine.SetGameObjectAuxSendValues(gameObject, auxSendValues, auxSendValues.m_Count);
        isDirty = false;
    }
Esempio n. 4
0
    void UpdateAuxSend()
    {
        if (m_auxSendValues == null)
        {
            m_auxSendValues = new AkAuxSendArray((uint)m_activeAuxSends.Count);
        }
        else
        {
            m_auxSendValues.Reset();
        }

        foreach (AkAuxSend AuxSend in m_activeAuxSends)
        {
            m_auxSendValues.Add(AuxSend.GetAuxBusID(), AuxSend.GetAuxSendValueForPosition(this.transform.Position));
        }

        AkSoundEngine.SetGameObjectAuxSendValues(this.Entity, m_auxSendValues, (uint)m_activeAuxSends.Count);
    }
    public void UpdateAuxSend(UnityEngine.GameObject gameObject, UnityEngine.Vector3 position)
    {
        if (!hasEnvironmentListChanged && !hasActivePortalListChanged && lastPosition == position)
        {
            return;
        }

        auxSendValues.Reset();
        AddHighestPriorityEnvironmentsFromPortals(position);
        AddHighestPriorityEnvironments(position);

        bool isSendingZero = auxSendValues.Count() == 0;

        if (!hasSentZero || !isSendingZero)
        {
            AkSoundEngine.SetEmitterAuxSendValues(gameObject, auxSendValues, (uint)auxSendValues.Count());
        }

        hasSentZero  = isSendingZero;
        lastPosition = position;
        hasActivePortalListChanged = false;
        hasEnvironmentListChanged  = false;
    }