Update of /cvsroot/audacity/audacity-src/src/widgets
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8490/src/widgets

Modified Files:
        Meter.cpp 
Log Message:
Fix: Adjusting the meter update frequency seems to make no difference whatever, 
whether it is 100, 30 or 1. 

Index: Meter.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- Meter.cpp   16 May 2009 11:13:13 -0000      1.41
+++ Meter.cpp   2 Jun 2009 14:07:05 -0000       1.42
@@ -232,14 +232,7 @@
       wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
     mBkgndBrush = wxBrush(backgroundColour, wxSOLID);
 
-   mDBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
-   mMeterRefreshRate = gPrefs->Read(wxT("/Meter/MeterRefreshRate"), 30);
-   if (mIsInput) {
-      mMeterDisabled = gPrefs->Read(wxT("/Meter/MeterInputDisabled"), (long)0);
-   }
-   else {
-      mMeterDisabled = gPrefs->Read(wxT("/Meter/MeterOutputDisabled"), 
(long)0);
-   }
+   UpdatePrefs();
 
    mPeakPeakPen = wxPen(theTheme.Colour( clrMeterPeak),        1, wxSOLID);
    mDisabledPen = wxPen(theTheme.Colour( clrMeterDisabledPen), 1, wxSOLID);
@@ -324,7 +317,7 @@
 
 void Meter::UpdatePrefs()
 {
-   mDBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), 60);
+   mDBRange = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
    mMeterRefreshRate = gPrefs->Read(wxT("/Meter/MeterRefreshRate"), 30);
    if (mIsInput) {
       mMeterDisabled = gPrefs->Read(wxT("/Meter/MeterInputDisabled"), (long)0);
@@ -463,7 +456,7 @@
    while(mQueue.Get(msg)) {
    }
 
-   mTimer.Start(25); // every 25 ms -> ~40 updates per second
+   mTimer.Start(1000 / mMeterRefreshRate);
 
    mLayoutValid = false;
    Refresh(false);


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to