Пример #1
0
        private static void Instance_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "ActiveStreamHandle" && !Player.Instance.NetStreamingConfigsLoaded)
            {
                if (Player.Instance.Wave != null)
                {
                    //Bass booster
                    BassBooster = new BassBoost(Player.Instance.Wave.Handle, prtBassBooster);
                    BassBooster.SetBypass(!Settings.Default.afx | !Settings.Default.BassBoost);
                    BassBooster.CutOff     = Settings.Default.BassRatio;
                    BassBooster.Bandwidth  = 0.320f;
                    BassBooster.d_vol      = 1;
                    BassBooster.p_vol      = 1 - (Settings.Default.BassRatio / 80.0f);
                    BassBooster.HighCutoff = Settings.Default.BassRatio;
                    BassBooster.LowCutoff1 = Settings.Default.BassRatio;
                    BassBooster.LowCutoff2 = Settings.Default.BassRatio;
                    BassBooster.Start();

                    //Stereo Enhancer

                    StereoEnhancer       = new StereoEnhancer(Player.Instance.Wave.Handle, prtStereoEnhancer);
                    StereoEnhancer.Width = (Settings.Default.StereoWidth / 50);
                    StereoEnhancer.SetBypass(!Settings.Default.afx | !Settings.Default.StereoWiden);
                    StereoEnhancer.Start();

                    //Equalizer
                    //Already made a EQ DSP for this Handle
                    MadeEq = false;
                    //Create the EQ

                    SetBFX_EQ(Player.Instance.Handle);

                    Booster = new BEQA(Player.Instance.Wave.Handle, prtBooster);
                    Booster.SetBypass(!Settings.Default.afx | !Settings.Default.boosters);
                    Booster.Start();
                    Booster.Eq.lg = Settings.Default.lg;
                    Booster.Eq.mg = Settings.Default.mg;
                    Booster.Eq.hg = Settings.Default.hg;


                    ////Treble booster
                    //TrebleBooster = new TrebleBooster(Player.Instance.Wave.Handle, prtTrebleBooster);
                    //TrebleBooster.SetBypass(!Settings.Default.BassBoost);
                    //TrebleBooster.CutOff = Settings.Default.BassRatio * 30;
                    //TrebleBooster.Bandwidth = Settings.Default.BassSelectivity / 1000f;
                    //TrebleBooster.d_vol = 1;
                    //TrebleBooster.p_vol = 1 - (Settings.Default.BassRatio / 80.0f);
                    //TrebleBooster.Start();
                    ByPassAll(!Settings.Default.afx);
                }
            }
            else if (e.PropertyName == "Play")
            {
            }
        }
Пример #2
0
 public static void ByPassAll(bool bypass)
 {
     if (Booster != null)
     {
         Booster.SetBypass(bypass | !Settings.Default.boosters);
     }
     if (BassBooster != null)
     {
         BassBooster.SetBypass(bypass | !Settings.Default.BassBoost);
     }
     if (StereoEnhancer != null)
     {
         StereoEnhancer.SetBypass(bypass | !Settings.Default.StereoWiden);
     }
     if (eql != null)
     {
         eql.SetBypass(bypass | !Settings.Default.Equalizer);
     }
 }