示例#1
0
        public void AddEffect(DspType effect)
        {
            var dsp = _system.CreateDspByType(effect);

            _effects.Add(dsp);
            EffectAdded?.Invoke(this, EventArgs.Empty);
        }
示例#2
0
 public void Play(Sound sound, params DspType[] effects)
 {
     Reset();
     _channel             = _system.PlaySound(sound, true);
     _channel.SoundEnded += (s, e) => Reset();
     foreach (var dspType in effects)
     {
         var dsp = _system.CreateDspByType(dspType);
         _effects.Add(dsp);
         _channel.AddDsp(dsp, DspIndex.Tail);
     }
 }