public static TEffectState Instantiate <TEffectState>(PlaybackContext playbackContext, EffectSettings settings) where TEffectState : EffectState, new() { var state = new TEffectState(); state.Init(playbackContext, settings); return(state); }
public override void Init(PlaybackContext playbackContext, EffectSettings settings) { Context = playbackContext; Settings = settings; Dsp = CreateDsp(); Context.Track.AddDsp(Dsp); ApplyInitialSettings(); }
public override EffectState CreateEffectState(PlaybackContext playbackContext) => EffectState.Instantiate <EchoEffectState>(playbackContext, this);
public override EffectState CreateEffectState(PlaybackContext playbackContext) => EffectState.Instantiate <BiQuadFilterEffectState>(playbackContext, this);
/// <summary> /// Creates a new effect state on a given audio track /// </summary> public abstract EffectState CreateEffectState(PlaybackContext playbackContext);
/// <summary> /// Initialize the effect for given audio track /// </summary> public abstract void Init(PlaybackContext playbackContext, EffectSettings settings);