private void UpdateSpatializerExtensionMixedValues()
        {
            m_AddSpatializerExtension = false;

            int numTargetsWithSpatializerExtensions = 0;

            for (int i = 0; i < targets.Length; i++)
            {
                AudioListener listener = targets[i] as AudioListener;
                if (listener != null)
                {
                    System.Type spatializerExtensionType = AudioExtensionManager.GetListenerSpatializerExtensionType();
                    if ((spatializerExtensionType != null) && (listener.GetNumExtensionPropertiesForThisExtension(spatializerExtensionType.Name) > 0))
                    {
                        m_AddSpatializerExtension = true;
                        numTargetsWithSpatializerExtensions++;
                    }
                }
            }

            m_AddSpatializerExtensionMixedValues = ((numTargetsWithSpatializerExtensions == 0) || (numTargetsWithSpatializerExtensions == targets.Length)) ? false : true;
            if (m_AddSpatializerExtensionMixedValues)
            {
                m_AddSpatializerExtension = false;
            }
        }
Ejemplo n.º 2
0
        private void UpdateSpatializerExtensionMixedValues()
        {
            this.m_AddSpatializerExtension = false;
            int num = 0;

            for (int i = 0; i < base.targets.Length; i++)
            {
                AudioListener audioListener = base.targets[i] as AudioListener;
                if (audioListener != null)
                {
                    Type listenerSpatializerExtensionType = AudioExtensionManager.GetListenerSpatializerExtensionType();
                    if (listenerSpatializerExtensionType != null && audioListener.GetNumExtensionPropertiesForThisExtension(listenerSpatializerExtensionType.Name) > 0)
                    {
                        this.m_AddSpatializerExtension = true;
                        num++;
                    }
                }
            }
            this.m_AddSpatializerExtensionMixedValues = (num != 0 && num != base.targets.Length);
            if (this.m_AddSpatializerExtensionMixedValues)
            {
                this.m_AddSpatializerExtension = false;
            }
        }