public static void InitEQ(ref EQControl EQSettings)
 {
     EQSettings.UseEqDisplay        = false;
     EQSettings.UseNormalEq         = true;
     EQSettings.UseStereoEq         = false;
     EQSettings.UseVUmeter          = false;
     EQSettings.UseVUmeter2         = false;
     EQSettings._useVUindicators    = false;
     EQSettings._useEqMode          = 0;
     EQSettings.RestrictEQ          = false;
     EQSettings.SmoothEQ            = false;
     EQSettings.DelayEQ             = true;
     EQSettings.EQTitleDisplay      = false;
     EQSettings._EqDataAvailable    = false;
     EQSettings.EqFftData           = new float[0x800];
     EQSettings.EqArray             = new byte[0x11];
     EQSettings.LastEQ              = new int[0x11];
     EQSettings._EQTitleDisplayTime = 10;
     EQSettings._EQTitleShowTime    = 2;
     EQSettings._LastEQTitle        = 0.0;
     EQSettings._EQDisplayTitle     = false;
     EQSettings._Max_EQ_FPS         = 0;
     EQSettings._EQ_Framecount      = 0;
     EQSettings._EQ_Restrict_FPS    = 10;
     EQSettings._EqUpdateDelay      = 0;
     EQSettings._DelayEQTime        = 0;
     using (Profile.Settings settings = new Profile.MPSettings())
     {
         EQSettings._AudioIsMixing = settings.GetValueAsBool("audioplayer", "mixing", false);
         EQSettings._AudioUseASIO  = settings.GetValueAsBool("audioplayer", "asio", false);
     }
 }
        public static void ProcessEqData(ref EQControl EQSettings)
        {
            bool extensiveLogging = Settings.Instance.ExtensiveLogging;

            if (extensiveLogging)
            {
                Log.Info("MiniDisplay.ProcessEqData(): called... MaxValue = {0}, BANDS = {1}",
                         new object[] { EQSettings.Render_MaxValue, EQSettings.Render_BANDS });
            }
            if ((EQSettings.UseStereoEq || EQSettings.UseVUmeter) || EQSettings.UseVUmeter2)
            {
                if (EQSettings.UseStereoEq)
                {
                    int num  = EQSettings.Render_MaxValue;
                    int num2 = EQSettings.Render_BANDS;
                    int num3 = 0;
                    for (int i = 0; i < num2; i++)
                    {
                        float num7  = 0f;
                        float num8  = 0f;
                        int   num10 = (int)Math.Pow(2.0, (i * 10.0) / ((double)(num2 - 1)));
                        if (num10 > 0x3ff)
                        {
                            num10 = 0x3ff;
                        }
                        if (num10 <= num3)
                        {
                            num10 = num3 + 1;
                        }
                        int num9 = (10 + num10) - num3;
                        while (num3 < num10)
                        {
                            num7 += EQSettings.EqFftData[2 + (num3 * 2)];
                            num8 += EQSettings.EqFftData[(2 + (num3 * 2)) + 1];
                            num3++;
                        }
                        int num4 = (int)((Math.Sqrt(((double)num7) / Math.Log10((double)num9)) * 1.7) * num);
                        int num5 = (int)((Math.Sqrt(((double)num8) / Math.Log10((double)num9)) * 1.7) * num);
                        if (extensiveLogging)
                        {
                            Log.Info("MiniDisplay.ProcessEqData(): Processing StereoEQ band {0}: L = {1}, R = {2}",
                                     new object[] { i, num4, num5 });
                        }
                        num4 = Math.Min(num, num4);
                        EQSettings.EqArray[1 + i] = (byte)num4;
                        num5 = Math.Min(num, num5);
                        EQSettings.EqArray[9 + i] = (byte)num5;
                        if (EQSettings.SmoothEQ)
                        {
                            if (EQSettings.EqArray[1 + i] < EQSettings.LastEQ[1 + i])
                            {
                                int num11 = EQSettings.LastEQ[1 + i];
                                num11 = EQSettings.LastEQ[1 + i] - ((int)0.5);
                                if (num11 < 0)
                                {
                                    num11 = 0;
                                }
                                EQSettings.EqArray[1 + i] = (byte)num11;
                                EQSettings.LastEQ[1 + i]  = num11;
                            }
                            else
                            {
                                EQSettings.LastEQ[1 + i] = EQSettings.EqArray[1 + i];
                            }
                            if (EQSettings.EqArray[9 + i] < EQSettings.LastEQ[9 + i])
                            {
                                int num12 = EQSettings.LastEQ[9 + i];
                                num12 = EQSettings.LastEQ[9 + i] - ((int)0.5);
                                if (num12 < 0)
                                {
                                    num12 = 0;
                                }
                                EQSettings.EqArray[9 + i] = (byte)num12;
                                EQSettings.LastEQ[9 + i]  = num12;
                            }
                            else
                            {
                                EQSettings.LastEQ[9 + i] = EQSettings.EqArray[9 + i];
                            }
                        }
                        if (extensiveLogging)
                        {
                            Log.Info("MiniDisplay.ProcessEqData.(): Processed StereoEQ mode {0} byte {1}: L = {2}, R = {3}.",
                                     new object[]
                            {
                                EQSettings.EqArray[0], i, EQSettings.EqArray[1 + (i * 2)].ToString(),
                                EQSettings.EqArray[2 + (i * 2)].ToString()
                            });
                        }
                    }
                }
                else
                {
                    int num13 = EQSettings.Render_MaxValue;
                    int num14 = EQSettings.Render_BANDS;
                    int num15 = 0;
                    for (int j = 0; j < num14; j++)
                    {
                        float num19 = 0f;
                        float num20 = 0f;
                        int   num22 = 0x3ff;
                        int   num21 = (10 + num22) - num15;
                        while (num15 < num22)
                        {
                            if (EQSettings.EqFftData[2 + (num15 * 2)] > num19)
                            {
                                num19 = EQSettings.EqFftData[2 + (num15 * 2)];
                            }
                            if (EQSettings.EqFftData[(2 + (num15 * 2)) + 1] > num20)
                            {
                                num20 = EQSettings.EqFftData[(2 + (num15 * 2)) + 1];
                            }
                            num15++;
                        }
                        int num16 = (int)((Math.Sqrt(((double)num19) / Math.Log10((double)num21)) * 1.7) * num13);
                        int num17 = (int)((Math.Sqrt(((double)num20) / Math.Log10((double)num21)) * 1.7) * num13);
                        if (extensiveLogging)
                        {
                            Log.Info("MiniDisplay.ProcessEqData(): Processing VUmeter band {0}: L = {1}, R = {2}",
                                     new object[] { j, num16, num17 });
                        }
                        num16 = Math.Min(num13, num16);
                        EQSettings.EqArray[1 + (j * 2)] = (byte)num16;
                        num17 = Math.Min(num13, num17);
                        EQSettings.EqArray[2 + (j * 2)] = (byte)num17;
                        if (EQSettings.SmoothEQ)
                        {
                            if (EQSettings.EqArray[1] < EQSettings.LastEQ[1])
                            {
                                int num23 = EQSettings.LastEQ[1];
                                num23 = EQSettings.LastEQ[1] - ((int)0.5);
                                if (num23 < 0)
                                {
                                    num23 = 0;
                                }
                                EQSettings.EqArray[1] = (byte)num23;
                                EQSettings.LastEQ[1]  = num23;
                            }
                            else
                            {
                                EQSettings.LastEQ[1] = EQSettings.EqArray[1];
                            }
                            if (EQSettings.EqArray[2] < EQSettings.LastEQ[2])
                            {
                                int num24 = EQSettings.LastEQ[2];
                                num24 = EQSettings.LastEQ[2] - ((int)0.5);
                                if (num24 < 0)
                                {
                                    num24 = 0;
                                }
                                EQSettings.EqArray[2] = (byte)num24;
                                EQSettings.LastEQ[2]  = num24;
                            }
                            else
                            {
                                EQSettings.LastEQ[2] = EQSettings.EqArray[2];
                            }
                        }
                        if (extensiveLogging)
                        {
                            Log.Info("MiniDisplay.ProcessEqData(): Processed VUmeter byte {0}: L = {1}, R = {2}.",
                                     new object[]
                                     { j, EQSettings.EqArray[1 + (j * 2)].ToString(), EQSettings.EqArray[2 + (j * 2)].ToString() });
                        }
                    }
                }
            }
            else
            {
                int num25 = EQSettings.Render_MaxValue;
                int num26 = EQSettings.Render_BANDS;
                int num27 = 0;
                for (int k = 0; k < num26; k++)
                {
                    float num30 = 0f;
                    int   num32 = (int)Math.Pow(2.0, (k * 10.0) / ((double)(num26 - 1)));
                    if (num32 > 0x3ff)
                    {
                        num32 = 0x3ff;
                    }
                    if (num32 <= num27)
                    {
                        num32 = num27 + 1;
                    }
                    int num31 = (10 + num32) - num27;
                    while (num27 < num32)
                    {
                        num30 += EQSettings.EqFftData[1 + num27];
                        num27++;
                    }
                    int num28 = (int)((Math.Sqrt(((double)num30) / Math.Log10((double)num31)) * 1.7) * num25);
                    if (extensiveLogging)
                    {
                        Log.Info("MiniDisplay.ProcessEqData(): Processing EQ band {0} = {1}", new object[] { k, num28 });
                    }
                    num28 = Math.Min(num25, num28);
                    EQSettings.EqArray[1 + k] = (byte)num28;
                    if (EQSettings.SmoothEQ)
                    {
                        if (EQSettings.EqArray[1 + k] < EQSettings.LastEQ[1 + k])
                        {
                            int num33 = EQSettings.LastEQ[1 + k];
                            num33 = EQSettings.LastEQ[1 + k] - ((int)0.5);
                            if (num33 < 0)
                            {
                                num33 = 0;
                            }
                            EQSettings.EqArray[1 + k] = (byte)num33;
                            EQSettings.LastEQ[1 + k]  = num33;
                        }
                        else
                        {
                            EQSettings.LastEQ[1 + k] = EQSettings.EqArray[1 + k];
                        }
                    }
                    if (extensiveLogging)
                    {
                        Log.Info("MiniDisplay.ProcessEqData(): Processed EQ mode {0} byte {1} = {2}.",
                                 new object[] { EQSettings.EqArray[0], k, EQSettings.EqArray[1 + k].ToString() });
                    }
                }
            }
            if (extensiveLogging)
            {
                Log.Info("MiniDisplay.ProcessEqData(): called");
            }
        }
        public static bool GetEQ(ref EQControl EQSETTINGS)
        {
            bool extensiveLogging = Settings.Instance.ExtensiveLogging;
            bool flag2            = (EQSETTINGS.UseStereoEq | EQSETTINGS.UseVUmeter) | EQSETTINGS.UseVUmeter2;

            if (g_Player.Player == null || !g_Player.IsMusic || !BassMusicPlayer.IsDefaultMusicPlayer)
            {
                return(false);
            }

            if (!EQSETTINGS.UseEqDisplay)
            {
                return(false);
            }
            if (EQSETTINGS._AudioUseASIO)
            {
                return(false);
            }
            try
            {
                if (EQSETTINGS.DelayEQ & (g_Player.CurrentPosition < EQSETTINGS._DelayEQTime))
                {
                    EQSETTINGS._EQDisplayTitle = false;
                    EQSETTINGS._LastEQTitle    = (DateTime.Now.Ticks / 1000);
                    return(false);
                }
                if (EQSETTINGS.EQTitleDisplay)
                {
                    if (g_Player.CurrentPosition < EQSETTINGS._EQTitleDisplayTime)
                    {
                        EQSETTINGS._EQDisplayTitle = false;
                    }
                    if (((DateTime.Now.Ticks / 1000) - EQSETTINGS._LastEQTitle) > (EQSETTINGS._EQTitleDisplayTime * 10000))
                    {
                        EQSETTINGS._LastEQTitle    = (DateTime.Now.Ticks / 1000);
                        EQSETTINGS._EQDisplayTitle = !EQSETTINGS._EQDisplayTitle;
                    }
                    if (EQSETTINGS._EQDisplayTitle &
                        (((DateTime.Now.Ticks / 1000) - EQSETTINGS._LastEQTitle) < (EQSETTINGS._EQTitleShowTime * 10000)))
                    {
                        return(false);
                    }
                }
            }
            catch
            {
                EQSETTINGS._EQDisplayTitle = false;
                EQSETTINGS._LastEQTitle    = (DateTime.Now.Ticks / 1000);
                return(false);
            }
            int handle = -1;

            try
            {
                handle = g_Player.Player.CurrentAudioStream;
            }
            catch (Exception exception)
            {
                Log.Debug("MiniDisplay.GetEQ(): Caugth exception obtaining audio stream: {0}", new object[] { exception });
                return(false);
            }
            if ((handle != 0) & (handle != -1))
            {
                int num2;
                if (extensiveLogging)
                {
                    Log.Info("MiniDisplay.GetEQ(): attempting to retrieve equalizer data from audio stream {0}",
                             new object[] { handle });
                }
                try
                {
                    int num3;
                    if (flag2)
                    {
                        num3 = -2147483630;
                    }
                    else
                    {
                        num3 = -2147483646;
                    }
                    num2 = Bass.BASS_ChannelGetData(handle, EQSETTINGS.EqFftData, num3);
                }
                catch
                {
                    if (extensiveLogging)
                    {
                        Log.Info("MiniDisplay.GetEQ(): CAUGHT EXCeption - audio stream {0} disappeared", new object[] { handle });
                    }
                    return(false);
                }
                if (num2 > 0)
                {
                    return(true);
                }
                if (extensiveLogging)
                {
                    Log.Info("MiniDisplay.GetEQ(): unable to retreive equalizer data");
                }
                return(false);
            }
            if (extensiveLogging)
            {
                Log.Info("MiniDisplay.GetEQ(): Audio Stream not available");
            }
            return(false);
        }
    public static bool GetEQ(ref EQControl EQSETTINGS)
    {
      bool extensiveLogging = Settings.Instance.ExtensiveLogging;
      bool flag2 = (EQSETTINGS.UseStereoEq | EQSETTINGS.UseVUmeter) | EQSETTINGS.UseVUmeter2;
      if (g_Player.Player == null || !g_Player.IsMusic || !BassMusicPlayer.IsDefaultMusicPlayer)
      {
        return false;
      }

      if (!EQSETTINGS.UseEqDisplay)
      {
        return false;
      }
      if (EQSETTINGS._AudioUseASIO)
      {
        return false;
      }
      try
      {
        if (EQSETTINGS.DelayEQ & (g_Player.CurrentPosition < EQSETTINGS._DelayEQTime))
        {
          EQSETTINGS._EQDisplayTitle = false;
          EQSETTINGS._LastEQTitle = (DateTime.Now.Ticks / 1000);
          return false;
        }
        if (EQSETTINGS.EQTitleDisplay)
        {
          if (g_Player.CurrentPosition < EQSETTINGS._EQTitleDisplayTime)
          {
            EQSETTINGS._EQDisplayTitle = false;
          }
          if (((DateTime.Now.Ticks / 1000) - EQSETTINGS._LastEQTitle) > (EQSETTINGS._EQTitleDisplayTime * 10000))
          {
            EQSETTINGS._LastEQTitle = (DateTime.Now.Ticks / 1000);
            EQSETTINGS._EQDisplayTitle = !EQSETTINGS._EQDisplayTitle;
          }
          if (EQSETTINGS._EQDisplayTitle &
              (((DateTime.Now.Ticks / 1000) - EQSETTINGS._LastEQTitle) < (EQSETTINGS._EQTitleShowTime * 10000)))
          {
            return false;
          }
        }
      }
      catch
      {
        EQSETTINGS._EQDisplayTitle = false;
        EQSETTINGS._LastEQTitle = (DateTime.Now.Ticks / 1000);
        return false;
      }
      int handle = -1;
      try
      {
        handle = g_Player.Player.CurrentAudioStream;
      }
      catch (Exception exception)
      {
        Log.Debug("MiniDisplay.GetEQ(): Caugth exception obtaining audio stream: {0}", new object[] {exception});
        return false;
      }
      if ((handle != 0) & (handle != -1))
      {
        int num2;
        if (extensiveLogging)
        {
          Log.Info("MiniDisplay.GetEQ(): attempting to retrieve equalizer data from audio stream {0}",
                   new object[] {handle});
        }
        try
        {
          int num3;
          if (flag2)
          {
            num3 = -2147483630;
          }
          else
          {
            num3 = -2147483646;
          }
          num2 = Bass.BASS_ChannelGetData(handle, EQSETTINGS.EqFftData, num3);
        }
        catch
        {
          if (extensiveLogging)
          {
            Log.Info("MiniDisplay.GetEQ(): CAUGHT EXCeption - audio stream {0} disappeared", new object[] {handle});
          }
          return false;
        }
        if (num2 > 0)
        {
          return true;
        }
        if (extensiveLogging)
        {
          Log.Info("MiniDisplay.GetEQ(): unable to retreive equalizer data");
        }
        return false;
      }
      if (extensiveLogging)
      {
        Log.Info("MiniDisplay.GetEQ(): Audio Stream not available");
      }
      return false;
    }
 public static void ProcessEqData(ref EQControl EQSettings)
 {
   bool extensiveLogging = Settings.Instance.ExtensiveLogging;
   if (extensiveLogging)
   {
     Log.Info("MiniDisplay.ProcessEqData(): called... MaxValue = {0}, BANDS = {1}",
              new object[] {EQSettings.Render_MaxValue, EQSettings.Render_BANDS});
   }
   if ((EQSettings.UseStereoEq || EQSettings.UseVUmeter) || EQSettings.UseVUmeter2)
   {
     if (EQSettings.UseStereoEq)
     {
       int num = EQSettings.Render_MaxValue;
       int num2 = EQSettings.Render_BANDS;
       int num3 = 0;
       for (int i = 0; i < num2; i++)
       {
         float num7 = 0f;
         float num8 = 0f;
         int num10 = (int)Math.Pow(2.0, (i * 10.0) / ((double)(num2 - 1)));
         if (num10 > 0x3ff)
         {
           num10 = 0x3ff;
         }
         if (num10 <= num3)
         {
           num10 = num3 + 1;
         }
         int num9 = (10 + num10) - num3;
         while (num3 < num10)
         {
           num7 += EQSettings.EqFftData[2 + (num3 * 2)];
           num8 += EQSettings.EqFftData[(2 + (num3 * 2)) + 1];
           num3++;
         }
         int num4 = (int)((Math.Sqrt(((double)num7) / Math.Log10((double)num9)) * 1.7) * num);
         int num5 = (int)((Math.Sqrt(((double)num8) / Math.Log10((double)num9)) * 1.7) * num);
         if (extensiveLogging)
         {
           Log.Info("MiniDisplay.ProcessEqData(): Processing StereoEQ band {0}: L = {1}, R = {2}",
                    new object[] {i, num4, num5});
         }
         num4 = Math.Min(num, num4);
         EQSettings.EqArray[1 + i] = (byte)num4;
         num5 = Math.Min(num, num5);
         EQSettings.EqArray[9 + i] = (byte)num5;
         if (EQSettings.SmoothEQ)
         {
           if (EQSettings.EqArray[1 + i] < EQSettings.LastEQ[1 + i])
           {
             int num11 = EQSettings.LastEQ[1 + i];
             num11 = EQSettings.LastEQ[1 + i] - ((int)0.5);
             if (num11 < 0)
             {
               num11 = 0;
             }
             EQSettings.EqArray[1 + i] = (byte)num11;
             EQSettings.LastEQ[1 + i] = num11;
           }
           else
           {
             EQSettings.LastEQ[1 + i] = EQSettings.EqArray[1 + i];
           }
           if (EQSettings.EqArray[9 + i] < EQSettings.LastEQ[9 + i])
           {
             int num12 = EQSettings.LastEQ[9 + i];
             num12 = EQSettings.LastEQ[9 + i] - ((int)0.5);
             if (num12 < 0)
             {
               num12 = 0;
             }
             EQSettings.EqArray[9 + i] = (byte)num12;
             EQSettings.LastEQ[9 + i] = num12;
           }
           else
           {
             EQSettings.LastEQ[9 + i] = EQSettings.EqArray[9 + i];
           }
         }
         if (extensiveLogging)
         {
           Log.Info("MiniDisplay.ProcessEqData.(): Processed StereoEQ mode {0} byte {1}: L = {2}, R = {3}.",
                    new object[]
                      {
                        EQSettings.EqArray[0], i, EQSettings.EqArray[1 + (i * 2)].ToString(),
                        EQSettings.EqArray[2 + (i * 2)].ToString()
                      });
         }
       }
     }
     else
     {
       int num13 = EQSettings.Render_MaxValue;
       int num14 = EQSettings.Render_BANDS;
       int num15 = 0;
       for (int j = 0; j < num14; j++)
       {
         float num19 = 0f;
         float num20 = 0f;
         int num22 = 0x3ff;
         int num21 = (10 + num22) - num15;
         while (num15 < num22)
         {
           if (EQSettings.EqFftData[2 + (num15 * 2)] > num19)
           {
             num19 = EQSettings.EqFftData[2 + (num15 * 2)];
           }
           if (EQSettings.EqFftData[(2 + (num15 * 2)) + 1] > num20)
           {
             num20 = EQSettings.EqFftData[(2 + (num15 * 2)) + 1];
           }
           num15++;
         }
         int num16 = (int)((Math.Sqrt(((double)num19) / Math.Log10((double)num21)) * 1.7) * num13);
         int num17 = (int)((Math.Sqrt(((double)num20) / Math.Log10((double)num21)) * 1.7) * num13);
         if (extensiveLogging)
         {
           Log.Info("MiniDisplay.ProcessEqData(): Processing VUmeter band {0}: L = {1}, R = {2}",
                    new object[] {j, num16, num17});
         }
         num16 = Math.Min(num13, num16);
         EQSettings.EqArray[1 + (j * 2)] = (byte)num16;
         num17 = Math.Min(num13, num17);
         EQSettings.EqArray[2 + (j * 2)] = (byte)num17;
         if (EQSettings.SmoothEQ)
         {
           if (EQSettings.EqArray[1] < EQSettings.LastEQ[1])
           {
             int num23 = EQSettings.LastEQ[1];
             num23 = EQSettings.LastEQ[1] - ((int)0.5);
             if (num23 < 0)
             {
               num23 = 0;
             }
             EQSettings.EqArray[1] = (byte)num23;
             EQSettings.LastEQ[1] = num23;
           }
           else
           {
             EQSettings.LastEQ[1] = EQSettings.EqArray[1];
           }
           if (EQSettings.EqArray[2] < EQSettings.LastEQ[2])
           {
             int num24 = EQSettings.LastEQ[2];
             num24 = EQSettings.LastEQ[2] - ((int)0.5);
             if (num24 < 0)
             {
               num24 = 0;
             }
             EQSettings.EqArray[2] = (byte)num24;
             EQSettings.LastEQ[2] = num24;
           }
           else
           {
             EQSettings.LastEQ[2] = EQSettings.EqArray[2];
           }
         }
         if (extensiveLogging)
         {
           Log.Info("MiniDisplay.ProcessEqData(): Processed VUmeter byte {0}: L = {1}, R = {2}.",
                    new object[]
                      {j, EQSettings.EqArray[1 + (j * 2)].ToString(), EQSettings.EqArray[2 + (j * 2)].ToString()});
         }
       }
     }
   }
   else
   {
     int num25 = EQSettings.Render_MaxValue;
     int num26 = EQSettings.Render_BANDS;
     int num27 = 0;
     for (int k = 0; k < num26; k++)
     {
       float num30 = 0f;
       int num32 = (int)Math.Pow(2.0, (k * 10.0) / ((double)(num26 - 1)));
       if (num32 > 0x3ff)
       {
         num32 = 0x3ff;
       }
       if (num32 <= num27)
       {
         num32 = num27 + 1;
       }
       int num31 = (10 + num32) - num27;
       while (num27 < num32)
       {
         num30 += EQSettings.EqFftData[1 + num27];
         num27++;
       }
       int num28 = (int)((Math.Sqrt(((double)num30) / Math.Log10((double)num31)) * 1.7) * num25);
       if (extensiveLogging)
       {
         Log.Info("MiniDisplay.ProcessEqData(): Processing EQ band {0} = {1}", new object[] {k, num28});
       }
       num28 = Math.Min(num25, num28);
       EQSettings.EqArray[1 + k] = (byte)num28;
       if (EQSettings.SmoothEQ)
       {
         if (EQSettings.EqArray[1 + k] < EQSettings.LastEQ[1 + k])
         {
           int num33 = EQSettings.LastEQ[1 + k];
           num33 = EQSettings.LastEQ[1 + k] - ((int)0.5);
           if (num33 < 0)
           {
             num33 = 0;
           }
           EQSettings.EqArray[1 + k] = (byte)num33;
           EQSettings.LastEQ[1 + k] = num33;
         }
         else
         {
           EQSettings.LastEQ[1 + k] = EQSettings.EqArray[1 + k];
         }
       }
       if (extensiveLogging)
       {
         Log.Info("MiniDisplay.ProcessEqData(): Processed EQ mode {0} byte {1} = {2}.",
                  new object[] {EQSettings.EqArray[0], k, EQSettings.EqArray[1 + k].ToString()});
       }
     }
   }
   if (extensiveLogging)
   {
     Log.Info("MiniDisplay.ProcessEqData(): called");
   }
 }
 public static void InitEQ(ref EQControl EQSettings)
 {
   EQSettings.UseEqDisplay = false;
   EQSettings.UseNormalEq = true;
   EQSettings.UseStereoEq = false;
   EQSettings.UseVUmeter = false;
   EQSettings.UseVUmeter2 = false;
   EQSettings._useVUindicators = false;
   EQSettings._useEqMode = 0;
   EQSettings.RestrictEQ = false;
   EQSettings.SmoothEQ = false;
   EQSettings.DelayEQ = true;
   EQSettings.EQTitleDisplay = false;
   EQSettings._EqDataAvailable = false;
   EQSettings.EqFftData = new float[0x800];
   EQSettings.EqArray = new byte[0x11];
   EQSettings.LastEQ = new int[0x11];
   EQSettings._EQTitleDisplayTime = 10;
   EQSettings._EQTitleShowTime = 2;
   EQSettings._LastEQTitle = 0.0;
   EQSettings._EQDisplayTitle = false;
   EQSettings._Max_EQ_FPS = 0;
   EQSettings._EQ_Framecount = 0;
   EQSettings._EQ_Restrict_FPS = 10;
   EQSettings._EqUpdateDelay = 0;
   EQSettings._DelayEQTime = 0;
   using (Profile.Settings settings = new Profile.MPSettings())
   {
     EQSettings._AudioIsMixing = settings.GetValueAsBool("audioplayer", "mixing", false);
     EQSettings._AudioUseASIO = settings.GetValueAsBool("audioplayer", "asio", false);
   }
 }
示例#7
0
        public static void SaveEqualizerSettings(EQControl EQSettings)
        {
            string type = Settings.Instance.Type;

            if (type.Equals("iMONLCDg"))
            {
                iMONLCDg.AdvancedSettings toSave = iMONLCDg.AdvancedSettings.Load();
                toSave.EqDisplay                   = EQSettings.UseEqDisplay;
                toSave.NormalEQ                    = EQSettings.UseNormalEq;
                toSave.StereoEQ                    = EQSettings.UseStereoEq;
                toSave.VUmeter                     = EQSettings.UseVUmeter;
                toSave.VUmeter2                    = EQSettings.UseVUmeter2;
                toSave.SmoothEQ                    = EQSettings.SmoothEQ;
                toSave.DelayEQ                     = EQSettings.DelayEQ;
                toSave.DelayEqTime                 = EQSettings._DelayEQTime;
                toSave.EQTitleDisplay              = EQSettings.EQTitleDisplay;
                toSave.EQTitleShowTime             = EQSettings._EQTitleShowTime;
                toSave.EQTitleDisplayTime          = EQSettings._EQTitleDisplayTime;
                toSave.RestrictEQ                  = true;
                toSave.EqRate                      = 30;
                iMONLCDg.AdvancedSettings.Instance = toSave;
                iMONLCDg.AdvancedSettings.Save(toSave);
                iMONLCDg.AdvancedSettings.NotifyDriver();
            }
            else if (type.Equals("CFontz"))
            {
                CFontz.AdvancedSettings settings2 = CFontz.AdvancedSettings.Load();
                settings2.EqDisplay              = EQSettings.UseEqDisplay;
                settings2.NormalEQ               = EQSettings.UseNormalEq;
                settings2.StereoEQ               = EQSettings.UseStereoEq;
                settings2.VUmeter                = EQSettings.UseVUmeter;
                settings2.VUmeter2               = EQSettings.UseVUmeter2;
                settings2.SmoothEQ               = EQSettings.SmoothEQ;
                settings2.DelayEQ                = EQSettings.DelayEQ;
                settings2.DelayEqTime            = EQSettings._DelayEQTime;
                settings2.EQTitleDisplay         = EQSettings.EQTitleDisplay;
                settings2.EQTitleShowTime        = EQSettings._EQTitleShowTime;
                settings2.EQTitleDisplayTime     = EQSettings._EQTitleDisplayTime;
                CFontz.AdvancedSettings.Instance = settings2;
                CFontz.AdvancedSettings.Save(settings2);
                CFontz.AdvancedSettings.NotifyDriver();
            }
            else if (type.Equals("MatrixMX"))
            {
                MatrixMX.AdvancedSettings settings3 = MatrixMX.AdvancedSettings.Load();
                settings3.EqDisplay                = EQSettings.UseEqDisplay;
                settings3.NormalEQ                 = EQSettings.UseNormalEq;
                settings3.StereoEQ                 = EQSettings.UseStereoEq;
                settings3.VUmeter                  = EQSettings.UseVUmeter;
                settings3.VUmeter2                 = EQSettings.UseVUmeter2;
                settings3.SmoothEQ                 = EQSettings.SmoothEQ;
                settings3.DelayEQ                  = EQSettings.DelayEQ;
                settings3.DelayEqTime              = EQSettings._DelayEQTime;
                settings3.EQTitleDisplay           = EQSettings.EQTitleDisplay;
                settings3.EQTitleShowTime          = EQSettings._EQTitleShowTime;
                settings3.EQTitleDisplayTime       = EQSettings._EQTitleDisplayTime;
                MatrixMX.AdvancedSettings.Instance = settings3;
                MatrixMX.AdvancedSettings.Save(settings3);
                MatrixMX.AdvancedSettings.NotifyDriver();
            }
            else if (type.Equals("MatrixGX"))
            {
                MatrixGX.AdvancedSettings settings4 = MatrixGX.AdvancedSettings.Load();
                settings4.EqDisplay                = EQSettings.UseEqDisplay;
                settings4.NormalEQ                 = EQSettings.UseNormalEq;
                settings4.StereoEQ                 = EQSettings.UseStereoEq;
                settings4.VUmeter                  = EQSettings.UseVUmeter;
                settings4.VUmeter2                 = EQSettings.UseVUmeter2;
                settings4.SmoothEQ                 = EQSettings.SmoothEQ;
                settings4.DelayEQ                  = EQSettings.DelayEQ;
                settings4.DelayEqTime              = EQSettings._DelayEQTime;
                settings4.EQTitleDisplay           = EQSettings.EQTitleDisplay;
                settings4.EQTitleShowTime          = EQSettings._EQTitleShowTime;
                settings4.EQTitleDisplayTime       = EQSettings._EQTitleDisplayTime;
                MatrixGX.AdvancedSettings.Instance = settings4;
                MatrixGX.AdvancedSettings.Save();
                MatrixGX.AdvancedSettings.NotifyDriver();
            }
            else if (type.Equals("VLSYS_Mplay"))
            {
                VLSYS_Mplay.AdvancedSettings settings5 = VLSYS_Mplay.AdvancedSettings.Load();
                settings5.EqDisplay                   = EQSettings.UseEqDisplay;
                settings5.NormalEQ                    = EQSettings.UseNormalEq;
                settings5.StereoEQ                    = EQSettings.UseStereoEq;
                settings5.VUmeter                     = EQSettings.UseVUmeter;
                settings5.VUmeter2                    = EQSettings.UseVUmeter2;
                settings5.SmoothEQ                    = EQSettings.SmoothEQ;
                settings5.DelayEQ                     = EQSettings.DelayEQ;
                settings5.DelayEqTime                 = EQSettings._DelayEQTime;
                settings5.EQTitleDisplay              = EQSettings.EQTitleDisplay;
                settings5.EQTitleShowTime             = EQSettings._EQTitleShowTime;
                settings5.EQTitleDisplayTime          = EQSettings._EQTitleDisplayTime;
                VLSYS_Mplay.AdvancedSettings.Instance = settings5;
                VLSYS_Mplay.AdvancedSettings.Save(settings5);
                VLSYS_Mplay.AdvancedSettings.NotifyDriver();
            }
            else if (type.Equals("DebugForm"))
            {
                DebugForm.AdvancedSettings settings6 = DebugForm.AdvancedSettings.Load();
                settings6.EqDisplay                 = EQSettings.UseEqDisplay;
                settings6.NormalEQ                  = EQSettings.UseNormalEq;
                settings6.StereoEQ                  = EQSettings.UseStereoEq;
                settings6.VUmeter                   = EQSettings.UseVUmeter;
                settings6.VUmeter2                  = EQSettings.UseVUmeter2;
                settings6.SmoothEQ                  = EQSettings.SmoothEQ;
                settings6.DelayEQ                   = EQSettings.DelayEQ;
                settings6.DelayEqTime               = EQSettings._DelayEQTime;
                settings6.EQTitleDisplay            = EQSettings.EQTitleDisplay;
                settings6.EQTitleShowTime           = EQSettings._EQTitleShowTime;
                settings6.EQTitleDisplayTime        = EQSettings._EQTitleDisplayTime;
                DebugForm.AdvancedSettings.Instance = settings6;
                DebugForm.AdvancedSettings.Save(settings6);
                DebugForm.AdvancedSettings.NotifyDriver();
            }
        }
示例#8
0
        public static EQControl LoadEqualizerSettings()
        {
            EQControl control = new EQControl();
            string    type    = Settings.Instance.Type;

            if (type.Equals("iMONLCDg"))
            {
                iMONLCDg.AdvancedSettings settings = iMONLCDg.AdvancedSettings.Load();
                control.UseEqDisplay        = settings.EqDisplay;
                control.UseNormalEq         = settings.NormalEQ;
                control.UseStereoEq         = settings.StereoEQ;
                control.UseVUmeter          = settings.VUmeter;
                control.UseVUmeter2         = settings.VUmeter2;
                control.SmoothEQ            = settings.SmoothEQ;
                control.DelayEQ             = settings.DelayEQ;
                control._DelayEQTime        = settings.DelayEqTime;
                control.EQTitleDisplay      = settings.EQTitleDisplay;
                control._EQTitleShowTime    = settings.EQTitleShowTime;
                control._EQTitleDisplayTime = settings.EQTitleDisplayTime;
                return(control);
            }
            if (type.Equals("CFontz"))
            {
                CFontz.AdvancedSettings settings2 = CFontz.AdvancedSettings.Load();
                control.UseEqDisplay        = settings2.EqDisplay;
                control.UseNormalEq         = settings2.NormalEQ;
                control.UseStereoEq         = settings2.StereoEQ;
                control.UseVUmeter          = settings2.VUmeter;
                control.UseVUmeter2         = settings2.VUmeter2;
                control.SmoothEQ            = settings2.SmoothEQ;
                control.DelayEQ             = settings2.DelayEQ;
                control._DelayEQTime        = settings2.DelayEqTime;
                control.EQTitleDisplay      = settings2.EQTitleDisplay;
                control._EQTitleShowTime    = settings2.EQTitleShowTime;
                control._EQTitleDisplayTime = settings2.EQTitleDisplayTime;
                return(control);
            }
            if (type.Equals("MatrixMX"))
            {
                MatrixMX.AdvancedSettings settings3 = MatrixMX.AdvancedSettings.Load();
                control.UseEqDisplay        = settings3.EqDisplay;
                control.UseNormalEq         = settings3.NormalEQ;
                control.UseStereoEq         = settings3.StereoEQ;
                control.UseVUmeter          = settings3.VUmeter;
                control.UseVUmeter2         = settings3.VUmeter2;
                control.SmoothEQ            = settings3.SmoothEQ;
                control.DelayEQ             = settings3.DelayEQ;
                control._DelayEQTime        = settings3.DelayEqTime;
                control.EQTitleDisplay      = settings3.EQTitleDisplay;
                control._EQTitleShowTime    = settings3.EQTitleShowTime;
                control._EQTitleDisplayTime = settings3.EQTitleDisplayTime;
                return(control);
            }
            if (type.Equals("MatrixGX"))
            {
                MatrixGX.AdvancedSettings settings4 = MatrixGX.AdvancedSettings.Load();
                control.UseEqDisplay        = settings4.EqDisplay;
                control.UseNormalEq         = settings4.NormalEQ;
                control.UseStereoEq         = settings4.StereoEQ;
                control.UseVUmeter          = settings4.VUmeter;
                control.UseVUmeter2         = settings4.VUmeter2;
                control.SmoothEQ            = settings4.SmoothEQ;
                control.DelayEQ             = settings4.DelayEQ;
                control._DelayEQTime        = settings4.DelayEqTime;
                control.EQTitleDisplay      = settings4.EQTitleDisplay;
                control._EQTitleShowTime    = settings4.EQTitleShowTime;
                control._EQTitleDisplayTime = settings4.EQTitleDisplayTime;
                return(control);
            }
            if (type.Equals("VLSYS_Mplay"))
            {
                VLSYS_Mplay.AdvancedSettings settings5 = VLSYS_Mplay.AdvancedSettings.Load();
                control.UseEqDisplay        = settings5.EqDisplay;
                control.UseNormalEq         = settings5.NormalEQ;
                control.UseStereoEq         = settings5.StereoEQ;
                control.UseVUmeter          = settings5.VUmeter;
                control.UseVUmeter2         = settings5.VUmeter2;
                control.SmoothEQ            = settings5.SmoothEQ;
                control.DelayEQ             = settings5.DelayEQ;
                control._DelayEQTime        = settings5.DelayEqTime;
                control.EQTitleDisplay      = settings5.EQTitleDisplay;
                control._EQTitleShowTime    = settings5.EQTitleShowTime;
                control._EQTitleDisplayTime = settings5.EQTitleDisplayTime;
            }
            if (type.Equals("DebugForm"))
            {
                DebugForm.AdvancedSettings settings6 = DebugForm.AdvancedSettings.Load();
                control.UseEqDisplay        = settings6.EqDisplay;
                control.UseNormalEq         = settings6.NormalEQ;
                control.UseStereoEq         = settings6.StereoEQ;
                control.UseVUmeter          = settings6.VUmeter;
                control.UseVUmeter2         = settings6.VUmeter2;
                control.SmoothEQ            = settings6.SmoothEQ;
                control.DelayEQ             = settings6.DelayEQ;
                control._DelayEQTime        = settings6.DelayEqTime;
                control.EQTitleDisplay      = settings6.EQTitleDisplay;
                control._EQTitleShowTime    = settings6.EQTitleShowTime;
                control._EQTitleDisplayTime = settings6.EQTitleDisplayTime;
            }
            return(control);
        }
示例#9
0
 public static void SaveEqualizerSettings(EQControl EQSettings)
 {
   string type = Settings.Instance.Type;
   if (type.Equals("iMONLCDg"))
   {
     iMONLCDg.AdvancedSettings toSave = iMONLCDg.AdvancedSettings.Load();
     toSave.EqDisplay = EQSettings.UseEqDisplay;
     toSave.NormalEQ = EQSettings.UseNormalEq;
     toSave.StereoEQ = EQSettings.UseStereoEq;
     toSave.VUmeter = EQSettings.UseVUmeter;
     toSave.VUmeter2 = EQSettings.UseVUmeter2;
     toSave.SmoothEQ = EQSettings.SmoothEQ;
     toSave.DelayEQ = EQSettings.DelayEQ;
     toSave.DelayEqTime = EQSettings._DelayEQTime;
     toSave.EQTitleDisplay = EQSettings.EQTitleDisplay;
     toSave.EQTitleShowTime = EQSettings._EQTitleShowTime;
     toSave.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     toSave.RestrictEQ = true;
     toSave.EqRate = 30;
     iMONLCDg.AdvancedSettings.Instance = toSave;
     iMONLCDg.AdvancedSettings.Save(toSave);
     iMONLCDg.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("CFontz"))
   {
     CFontz.AdvancedSettings settings2 = CFontz.AdvancedSettings.Load();
     settings2.EqDisplay = EQSettings.UseEqDisplay;
     settings2.NormalEQ = EQSettings.UseNormalEq;
     settings2.StereoEQ = EQSettings.UseStereoEq;
     settings2.VUmeter = EQSettings.UseVUmeter;
     settings2.VUmeter2 = EQSettings.UseVUmeter2;
     settings2.SmoothEQ = EQSettings.SmoothEQ;
     settings2.DelayEQ = EQSettings.DelayEQ;
     settings2.DelayEqTime = EQSettings._DelayEQTime;
     settings2.EQTitleDisplay = EQSettings.EQTitleDisplay;
     settings2.EQTitleShowTime = EQSettings._EQTitleShowTime;
     settings2.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     CFontz.AdvancedSettings.Instance = settings2;
     CFontz.AdvancedSettings.Save(settings2);
     CFontz.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("MatrixMX"))
   {
     MatrixMX.AdvancedSettings settings3 = MatrixMX.AdvancedSettings.Load();
     settings3.EqDisplay = EQSettings.UseEqDisplay;
     settings3.NormalEQ = EQSettings.UseNormalEq;
     settings3.StereoEQ = EQSettings.UseStereoEq;
     settings3.VUmeter = EQSettings.UseVUmeter;
     settings3.VUmeter2 = EQSettings.UseVUmeter2;
     settings3.SmoothEQ = EQSettings.SmoothEQ;
     settings3.DelayEQ = EQSettings.DelayEQ;
     settings3.DelayEqTime = EQSettings._DelayEQTime;
     settings3.EQTitleDisplay = EQSettings.EQTitleDisplay;
     settings3.EQTitleShowTime = EQSettings._EQTitleShowTime;
     settings3.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     MatrixMX.AdvancedSettings.Instance = settings3;
     MatrixMX.AdvancedSettings.Save(settings3);
     MatrixMX.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("MatrixGX"))
   {
     MatrixGX.AdvancedSettings settings4 = MatrixGX.AdvancedSettings.Load();
     settings4.EqDisplay = EQSettings.UseEqDisplay;
     settings4.NormalEQ = EQSettings.UseNormalEq;
     settings4.StereoEQ = EQSettings.UseStereoEq;
     settings4.VUmeter = EQSettings.UseVUmeter;
     settings4.VUmeter2 = EQSettings.UseVUmeter2;
     settings4.SmoothEQ = EQSettings.SmoothEQ;
     settings4.DelayEQ = EQSettings.DelayEQ;
     settings4.DelayEqTime = EQSettings._DelayEQTime;
     settings4.EQTitleDisplay = EQSettings.EQTitleDisplay;
     settings4.EQTitleShowTime = EQSettings._EQTitleShowTime;
     settings4.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     MatrixGX.AdvancedSettings.Instance = settings4;
     MatrixGX.AdvancedSettings.Save();
     MatrixGX.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("VLSYS_Mplay"))
   {
     VLSYS_Mplay.AdvancedSettings settings5 = VLSYS_Mplay.AdvancedSettings.Load();
     settings5.EqDisplay = EQSettings.UseEqDisplay;
     settings5.NormalEQ = EQSettings.UseNormalEq;
     settings5.StereoEQ = EQSettings.UseStereoEq;
     settings5.VUmeter = EQSettings.UseVUmeter;
     settings5.VUmeter2 = EQSettings.UseVUmeter2;
     settings5.SmoothEQ = EQSettings.SmoothEQ;
     settings5.DelayEQ = EQSettings.DelayEQ;
     settings5.DelayEqTime = EQSettings._DelayEQTime;
     settings5.EQTitleDisplay = EQSettings.EQTitleDisplay;
     settings5.EQTitleShowTime = EQSettings._EQTitleShowTime;
     settings5.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     VLSYS_Mplay.AdvancedSettings.Instance = settings5;
     VLSYS_Mplay.AdvancedSettings.Save(settings5);
     VLSYS_Mplay.AdvancedSettings.NotifyDriver();
   }
   else if (type.Equals("DebugForm"))
   {
     DebugForm.AdvancedSettings settings6 = DebugForm.AdvancedSettings.Load();
     settings6.EqDisplay = EQSettings.UseEqDisplay;
     settings6.NormalEQ = EQSettings.UseNormalEq;
     settings6.StereoEQ = EQSettings.UseStereoEq;
     settings6.VUmeter = EQSettings.UseVUmeter;
     settings6.VUmeter2 = EQSettings.UseVUmeter2;
     settings6.SmoothEQ = EQSettings.SmoothEQ;
     settings6.DelayEQ = EQSettings.DelayEQ;
     settings6.DelayEqTime = EQSettings._DelayEQTime;
     settings6.EQTitleDisplay = EQSettings.EQTitleDisplay;
     settings6.EQTitleShowTime = EQSettings._EQTitleShowTime;
     settings6.EQTitleDisplayTime = EQSettings._EQTitleDisplayTime;
     DebugForm.AdvancedSettings.Instance = settings6;
     DebugForm.AdvancedSettings.Save(settings6);
     DebugForm.AdvancedSettings.NotifyDriver();
   }
 }
示例#10
0
 public static EQControl LoadEqualizerSettings()
 {
   EQControl control = new EQControl();
   string type = Settings.Instance.Type;
   if (type.Equals("iMONLCDg"))
   {
     iMONLCDg.AdvancedSettings settings = iMONLCDg.AdvancedSettings.Load();
     control.UseEqDisplay = settings.EqDisplay;
     control.UseNormalEq = settings.NormalEQ;
     control.UseStereoEq = settings.StereoEQ;
     control.UseVUmeter = settings.VUmeter;
     control.UseVUmeter2 = settings.VUmeter2;
     control.SmoothEQ = settings.SmoothEQ;
     control.DelayEQ = settings.DelayEQ;
     control._DelayEQTime = settings.DelayEqTime;
     control.EQTitleDisplay = settings.EQTitleDisplay;
     control._EQTitleShowTime = settings.EQTitleShowTime;
     control._EQTitleDisplayTime = settings.EQTitleDisplayTime;
     return control;
   }
   if (type.Equals("CFontz"))
   {
     CFontz.AdvancedSettings settings2 = CFontz.AdvancedSettings.Load();
     control.UseEqDisplay = settings2.EqDisplay;
     control.UseNormalEq = settings2.NormalEQ;
     control.UseStereoEq = settings2.StereoEQ;
     control.UseVUmeter = settings2.VUmeter;
     control.UseVUmeter2 = settings2.VUmeter2;
     control.SmoothEQ = settings2.SmoothEQ;
     control.DelayEQ = settings2.DelayEQ;
     control._DelayEQTime = settings2.DelayEqTime;
     control.EQTitleDisplay = settings2.EQTitleDisplay;
     control._EQTitleShowTime = settings2.EQTitleShowTime;
     control._EQTitleDisplayTime = settings2.EQTitleDisplayTime;
     return control;
   }
   if (type.Equals("MatrixMX"))
   {
     MatrixMX.AdvancedSettings settings3 = MatrixMX.AdvancedSettings.Load();
     control.UseEqDisplay = settings3.EqDisplay;
     control.UseNormalEq = settings3.NormalEQ;
     control.UseStereoEq = settings3.StereoEQ;
     control.UseVUmeter = settings3.VUmeter;
     control.UseVUmeter2 = settings3.VUmeter2;
     control.SmoothEQ = settings3.SmoothEQ;
     control.DelayEQ = settings3.DelayEQ;
     control._DelayEQTime = settings3.DelayEqTime;
     control.EQTitleDisplay = settings3.EQTitleDisplay;
     control._EQTitleShowTime = settings3.EQTitleShowTime;
     control._EQTitleDisplayTime = settings3.EQTitleDisplayTime;
     return control;
   }
   if (type.Equals("MatrixGX"))
   {
     MatrixGX.AdvancedSettings settings4 = MatrixGX.AdvancedSettings.Load();
     control.UseEqDisplay = settings4.EqDisplay;
     control.UseNormalEq = settings4.NormalEQ;
     control.UseStereoEq = settings4.StereoEQ;
     control.UseVUmeter = settings4.VUmeter;
     control.UseVUmeter2 = settings4.VUmeter2;
     control.SmoothEQ = settings4.SmoothEQ;
     control.DelayEQ = settings4.DelayEQ;
     control._DelayEQTime = settings4.DelayEqTime;
     control.EQTitleDisplay = settings4.EQTitleDisplay;
     control._EQTitleShowTime = settings4.EQTitleShowTime;
     control._EQTitleDisplayTime = settings4.EQTitleDisplayTime;
     return control;
   }
   if (type.Equals("VLSYS_Mplay"))
   {
     VLSYS_Mplay.AdvancedSettings settings5 = VLSYS_Mplay.AdvancedSettings.Load();
     control.UseEqDisplay = settings5.EqDisplay;
     control.UseNormalEq = settings5.NormalEQ;
     control.UseStereoEq = settings5.StereoEQ;
     control.UseVUmeter = settings5.VUmeter;
     control.UseVUmeter2 = settings5.VUmeter2;
     control.SmoothEQ = settings5.SmoothEQ;
     control.DelayEQ = settings5.DelayEQ;
     control._DelayEQTime = settings5.DelayEqTime;
     control.EQTitleDisplay = settings5.EQTitleDisplay;
     control._EQTitleShowTime = settings5.EQTitleShowTime;
     control._EQTitleDisplayTime = settings5.EQTitleDisplayTime;
   }
   if (type.Equals("DebugForm"))
   {
     DebugForm.AdvancedSettings settings6 = DebugForm.AdvancedSettings.Load();
     control.UseEqDisplay = settings6.EqDisplay;
     control.UseNormalEq = settings6.NormalEQ;
     control.UseStereoEq = settings6.StereoEQ;
     control.UseVUmeter = settings6.VUmeter;
     control.UseVUmeter2 = settings6.VUmeter2;
     control.SmoothEQ = settings6.SmoothEQ;
     control.DelayEQ = settings6.DelayEQ;
     control._DelayEQTime = settings6.DelayEqTime;
     control.EQTitleDisplay = settings6.EQTitleDisplay;
     control._EQTitleShowTime = settings6.EQTitleShowTime;
     control._EQTitleDisplayTime = settings6.EQTitleDisplayTime;
   }
   return control;
 }