Ejemplo n.º 1
0
        EventStatus IEventListener.Process(Event zEvent)
        {
            switch (zEvent.EventAction)
            {
            case EventAction.AddPreset:
                AddPreset((string)zEvent._parameter);
                break;

            case EventAction.RemovePreset:
                RemovePreset((string)zEvent._parameter);
                break;

            case EventAction.ResetDynamicMixer:
                Reset();
                break;

            case EventAction.SwitchPreset:
            {
                SwitchPresetData switchPresetData = (SwitchPresetData)zEvent._parameter;
                if (switchPresetData != null)
                {
                    if (switchPresetData._sourcePreset.Length > 0)
                    {
                        SwitchPreset(switchPresetData._sourcePreset, switchPresetData._targetPreset);
                    }
                    else
                    {
                        SwitchPreset(_currentSwitchedPreset, switchPresetData._targetPreset);
                    }
                }
                break;
            }
            }
            return(EventStatus.Handled);
        }
Ejemplo n.º 2
0
 public void Reset()
 {
     _type                     = OverrideParameterType.Float;
     _floatParameter           = 1f;
     _stringParameter          = "";
     _switchPresetData         = null;
     _dspParameterData         = null;
     _transitionToSnapshotData = null;
 }