public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
        {
            foreach (MixerEffectDefinition definition in s_MixerEffectDefinitions)
            {
                if (definition.name == name)
                {
                    //Cannot add this type, already exists in the system.
                    return(false);
                }
            }

            MixerEffectDefinition newDefinition = new MixerEffectDefinition(name, definitions);

            s_MixerEffectDefinitions.Add(newDefinition);

            //Wasteful - Clears the runtime representation each time a new effect is added and rebuilds all runtime
            //representations.
            ClearDefinitionsRuntime();
            foreach (MixerEffectDefinition definition in s_MixerEffectDefinitions)
            {
                AddDefinitionRuntime(definition.name, definition.parameters);
            }

            return(true);
        }
Exemplo n.º 2
0
        public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
        {
            using (List <MixerEffectDefinition> .Enumerator enumerator = MixerEffectDefinitions.s_MixerEffectDefinitions.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    if (enumerator.Current.name == name)
                    {
                        return(false);
                    }
                }
            }
            MixerEffectDefinition effectDefinition = new MixerEffectDefinition(name, definitions);

            MixerEffectDefinitions.s_MixerEffectDefinitions.Add(effectDefinition);
            MixerEffectDefinitions.ClearDefinitionsRuntime();
            using (List <MixerEffectDefinition> .Enumerator enumerator = MixerEffectDefinitions.s_MixerEffectDefinitions.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    MixerEffectDefinition current = enumerator.Current;
                    MixerEffectDefinitions.AddDefinitionRuntime(current.name, current.parameters);
                }
            }
            return(true);
        }
Exemplo n.º 3
0
 public static MixerParameterDefinition[] GetEffectParameters(string effect)
 {
     using (List <MixerEffectDefinition> .Enumerator enumerator = MixerEffectDefinitions.s_MixerEffectDefinitions.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             MixerEffectDefinition current = enumerator.Current;
             if (current.name == effect)
             {
                 return(current.parameters);
             }
         }
     }
     return(new MixerParameterDefinition[0]);
 }
Exemplo n.º 4
0
        public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
        {
            foreach (MixerEffectDefinition definition in s_MixerEffectDefinitions)
            {
                if (definition.name == name)
                {
                    return(false);
                }
            }
            MixerEffectDefinition item = new MixerEffectDefinition(name, definitions);

            s_MixerEffectDefinitions.Add(item);
            ClearDefinitionsRuntime();
            foreach (MixerEffectDefinition definition3 in s_MixerEffectDefinitions)
            {
                AddDefinitionRuntime(definition3.name, definition3.parameters);
            }
            return(true);
        }
        public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
        {
            foreach (MixerEffectDefinition current in MixerEffectDefinitions.s_MixerEffectDefinitions)
            {
                if (current.name == name)
                {
                    return(false);
                }
            }
            MixerEffectDefinition item = new MixerEffectDefinition(name, definitions);

            MixerEffectDefinitions.s_MixerEffectDefinitions.Add(item);
            MixerEffectDefinitions.ClearDefinitionsRuntime();
            foreach (MixerEffectDefinition current2 in MixerEffectDefinitions.s_MixerEffectDefinitions)
            {
                MixerEffectDefinitions.AddDefinitionRuntime(current2.name, current2.parameters);
            }
            return(true);
        }
 public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
 {
     foreach (MixerEffectDefinition definition in s_MixerEffectDefinitions)
     {
         if (definition.name == name)
         {
             return false;
         }
     }
     MixerEffectDefinition item = new MixerEffectDefinition(name, definitions);
     s_MixerEffectDefinitions.Add(item);
     ClearDefinitionsRuntime();
     foreach (MixerEffectDefinition definition3 in s_MixerEffectDefinitions)
     {
         AddDefinitionRuntime(definition3.name, definition3.parameters);
     }
     return true;
 }
 public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
 {
   using (List<MixerEffectDefinition>.Enumerator enumerator = MixerEffectDefinitions.s_MixerEffectDefinitions.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       if (enumerator.Current.name == name)
         return false;
     }
   }
   MixerEffectDefinition effectDefinition = new MixerEffectDefinition(name, definitions);
   MixerEffectDefinitions.s_MixerEffectDefinitions.Add(effectDefinition);
   MixerEffectDefinitions.ClearDefinitionsRuntime();
   using (List<MixerEffectDefinition>.Enumerator enumerator = MixerEffectDefinitions.s_MixerEffectDefinitions.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       MixerEffectDefinition current = enumerator.Current;
       MixerEffectDefinitions.AddDefinitionRuntime(current.name, current.parameters);
     }
   }
   return true;
 }
		public static bool RegisterAudioMixerEffect(string name, MixerParameterDefinition[] definitions)
		{
			foreach (MixerEffectDefinition current in MixerEffectDefinitions.s_MixerEffectDefinitions)
			{
				if (current.name == name)
				{
					return false;
				}
			}
			MixerEffectDefinition item = new MixerEffectDefinition(name, definitions);
			MixerEffectDefinitions.s_MixerEffectDefinitions.Add(item);
			MixerEffectDefinitions.ClearDefinitionsRuntime();
			foreach (MixerEffectDefinition current2 in MixerEffectDefinitions.s_MixerEffectDefinitions)
			{
				MixerEffectDefinitions.AddDefinitionRuntime(current2.name, current2.parameters);
			}
			return true;
		}