public AudioExtensionDefinition(AudioExtensionDefinition definition)
 {
     this.assemblyName       = definition.assemblyName;
     this.extensionNamespace = definition.extensionNamespace;
     this.extensionTypeName  = definition.extensionTypeName;
     this.extensionType      = this.GetExtensionType();
 }
示例#2
0
        private static bool RegisterSourceAmbisonicDefinition(string ambisonicDecoderName, AudioExtensionDefinition extensionDefinition)
        {
            foreach (AudioAmbisonicExtensionDefinition audioAmbisonicExtensionDefinition in AudioExtensionManager.m_SourceAmbisonicDecoderExtensionDefinitions)
            {
                if (ambisonicDecoderName == audioAmbisonicExtensionDefinition.ambisonicPluginName)
                {
                    Debug.Log("RegisterSourceAmbisonicDefinition failed for " + extensionDefinition.GetExtensionType() + ". We only allow one audio source extension to be registered for each ambisonic decoder.");
                    return(false);
                }
            }
            AudioAmbisonicExtensionDefinition item = new AudioAmbisonicExtensionDefinition(ambisonicDecoderName, extensionDefinition);

            AudioExtensionManager.m_SourceAmbisonicDecoderExtensionDefinitions.Add(item);
            return(true);
        }
示例#3
0
        private static bool RegisterSourceSpatializerDefinition(string spatializerName, AudioExtensionDefinition extensionDefinition, AudioExtensionDefinition editorDefinition)
        {
            foreach (AudioSpatializerExtensionDefinition audioSpatializerExtensionDefinition in AudioExtensionManager.m_SourceSpatializerExtensionDefinitions)
            {
                if (spatializerName == audioSpatializerExtensionDefinition.spatializerName)
                {
                    Debug.Log("RegisterSourceSpatializerDefinition failed for " + extensionDefinition.GetExtensionType() + ". We only allow one audio source extension to be registered for each spatializer.");
                    return(false);
                }
            }
            AudioSpatializerExtensionDefinition item = new AudioSpatializerExtensionDefinition(spatializerName, extensionDefinition, editorDefinition);

            AudioExtensionManager.m_SourceSpatializerExtensionDefinitions.Add(item);
            return(true);
        }
 public AudioSpatializerExtensionDefinition(string spatializerNameIn, AudioExtensionDefinition definitionIn, AudioExtensionDefinition editorDefinitionIn)
 {
     this.spatializerName  = spatializerNameIn;
     this.definition       = definitionIn;
     this.editorDefinition = editorDefinitionIn;
 }
 public AudioAmbisonicExtensionDefinition(string ambisonicNameIn, AudioExtensionDefinition definitionIn)
 {
     this.ambisonicPluginName = ambisonicNameIn;
     this.definition          = definitionIn;
 }
示例#6
0
        static private bool RegisterListenerSpatializerDefinition(string spatializerName, AudioExtensionDefinition extensionDefinition, AudioExtensionDefinition editorDefinition)
        {
            foreach (AudioSpatializerExtensionDefinition definition in m_ListenerSpatializerExtensionDefinitions)
            {
                if (spatializerName == definition.spatializerName)
                {
                    Debug.Log("RegisterListenerSpatializerDefinition failed for " + extensionDefinition.GetExtensionType() + ". We only allow one audio listener extension to be registered for each spatializer.");
                    return(false);
                }
            }

            AudioSpatializerExtensionDefinition newDefinition = new AudioSpatializerExtensionDefinition(spatializerName, extensionDefinition, editorDefinition);

            m_ListenerSpatializerExtensionDefinitions.Add(newDefinition);

            return(true);
        }
示例#7
0
        private static bool RegisterListenerSpatializerDefinition(string spatializerName, AudioExtensionDefinition extensionDefinition, AudioExtensionDefinition editorDefinition)
        {
            bool result;

            foreach (AudioSpatializerExtensionDefinition current in AudioExtensionManager.m_ListenerSpatializerExtensionDefinitions)
            {
                if (spatializerName == current.spatializerName)
                {
                    Debug.Log("RegisterListenerSpatializerDefinition failed for " + extensionDefinition.GetExtensionType() + ". We only allow one audio listener extension to be registered for each spatializer.");
                    result = false;
                    return(result);
                }
            }
            AudioSpatializerExtensionDefinition item = new AudioSpatializerExtensionDefinition(spatializerName, extensionDefinition, editorDefinition);

            AudioExtensionManager.m_ListenerSpatializerExtensionDefinitions.Add(item);
            result = true;
            return(result);
        }