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); }
public static void ClearDefinitions() { MixerEffectDefinitions.s_MixerEffectDefinitions.Clear(); MixerEffectDefinitions.ClearDefinitionsRuntime(); }