コード例 #1
0
        // 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));
        }
コード例 #2
0
 public void Dispose()
 {
     notify.Dispose();
     LFW_instance = null;
     AudioDelegations.FftAcquired = null;
 }