protected override void OnInitNewState(Context context) { base.OnInitNewState(context); m_audio = m_sequence.ToAudio(); m_audio.InitNewState(context); }
//could expose the list but I want the interfaces for mix and split to be consistent public void AddInput(IAudioNode input) { MixerChannel mixerIn = new MixerChannel(); mixerIn.inputNode = input; mixerIn.pan = 0.5; mixerIn.outputLevel = 1.0; m_inputs.Add(mixerIn); }
public static void SwitchEffect(this IAudioNode node, bool on, IAudioEffectDefinition effect) { if (effect == null) { return; } if (on) { node.EnableEffectsByDefinition(effect); } else { node.DisableEffectsByDefinition(effect); } }
public IAudioNode DecorateAudioNode(IAudioNode node, XmlElement element, Context context) { HashSet<string> existingAttrs = new HashSet<string>(); for (int i = 0; i < element.Attributes.Count; i++) { existingAttrs.Add(element.Attributes[i].LocalName); } foreach (XmlNode child in element.ChildNodes) { int attrIndex = child.LocalName.IndexOf('.'); if (attrIndex != -1) { existingAttrs.Add(child.LocalName.Substring(attrIndex + 1)); } } foreach (DecoratorInfo decorator in m_audioDecorators) { if (decorator.triggeredProperties.Overlaps(existingAttrs)) { IAudioDecoratorNode decoratorNode = decorator.ctor(); decoratorNode.XmlData = element; decoratorNode.DecoratedNode = node; node = decoratorNode; } } return node; }
//could expose the list but I want the interfaces for mix and split to be consistent public void AddInput(IAudioNode input) { m_inputs.Add(input); }