Update of /cvsroot/audacity/audacity-src/src/widgets In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv2579/widgets
Modified Files: Meter.cpp Meter.h Log Message: Pause recording when input is silent. Changes in AudioIO, Meter, AudioIOPrefs and ShuttleGUI cpp/h. Let me know if I've broken anything! Index: Meter.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Meter.h 2 Jan 2006 02:55:48 -0000 1.8 +++ Meter.h 24 Jun 2007 23:19:14 -0000 1.9 @@ -103,6 +103,8 @@ bool IsMeterDisabled(); // End thread-safe methods // + + float GetMaxPeak(); // // Event handlers Index: Meter.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Meter.cpp 27 May 2007 17:56:08 -0000 1.27 +++ Meter.cpp 24 Jun 2007 23:19:14 -0000 1.28 @@ -559,6 +559,17 @@ RepaintBarsNow(); } +float Meter::GetMaxPeak() +{ + int j; + float maxPeak = 0.; + + for(j=0; j<mNumBars; j++) + maxPeak = mBar[j].peak > maxPeak ? mBar[j].peak : maxPeak; + + return(maxPeak); +} + wxFont Meter::GetFont() { int fontSize = 10; @@ -576,10 +587,10 @@ b->peakHold = 0.0; b->peakHoldTime = 0.0; if (resetClipping) - { + { b->clipping = false; b->peakPeakHold =0.0; - } + } b->tailPeakCount = 0; } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs