Ejemplo n.º 1
0
        private void BeginB_Click(object sender, RoutedEventArgs e)
        {
            BeginB.IsEnabled = false;
            Output           = new NullOut();
            CurrentComplexes.Clear();

            cparam.Take         = TakeS.Value;
            cparam.Begining     = FftBeginS.Value;
            cparam.Threshold    = ThreshS.Value;
            cparam.UsingLowPass = LowPassC.IsChecked ?? false;

            mfr               = new MediaFoundationReader(Path);
            ProgressB.Value   = 0;
            ProgressB.Maximum = mfr.TotalTime.TotalMilliseconds;

            Equalizer eq = new Equalizer(new SampleChannel(mfr));

            eq.AddLowPassFilter(500, 0.1f);
            eq.Enabled = cparam.UsingLowPass;

            fftProv = new FFT.SyncSampleProvider(eq);
            Output.Init(fftProv);

            fftProv.FftFinished    += FftProv_FftFinished;
            Output.PlaybackStopped += Output_PlaybackStopped;

            Task.Run(() =>
            {
                Output.Play();
            });
        }