// Constructor public LpsAudio(bool immersed = false) { wasapiOut = WasapiOut.IsSupportedOnCurrentPlatform ? GetWasapiSoundOut(immersed) : GetDirectSoundOut(); lfw = LpsFftWarp.INSTANCE; lEnum = new LyricEnumerator(); ConsoleAdapter.INSTANCE.RegisterComponent("lpsa", this); wasapiOut.Stopped += (s, e) => { //Counter?.Abort(); //AudioDelegations.PlayingFinished?.Invoke(); }; AudioDelegations.ChangeVolume += vol => { wasapiOut.Volume = vol; }; //Counter = new Thread(new ThreadStart(CountTimerDelegate)); }
public void Dispose() { notify.Dispose(); LFW_instance = null; AudioDelegations.FftAcquired = null; }