Update of /cvsroot/audacity/audacity-src/src/widgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12711/widgets
Modified Files: Meter.cpp Log Message: AV: avoiding calls to AVProcess when on Discard Timezone. moving call to AudioIO::AVSetStartTime(). Adding debug. Index: Meter.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- Meter.cpp 16 Aug 2009 04:58:39 -0000 1.63 +++ Meter.cpp 16 Aug 2009 19:52:46 -0000 1.64 @@ -636,6 +636,7 @@ MeterUpdateMsg msg; int numChanges = 0; double maxPeak = 0.0; + bool discarded = false; // There may have been several update messages since the last // time we got to this function. Catch up to real-time by // popping them off until there are none left. It is necessary @@ -695,11 +696,14 @@ mBar[j].tailPeakCount = msg.tailPeakCount[j]; #ifdef AUTOMATIC_VOLUME if (mT > gAudioIO->AVGetLastDecisionTime()) { + discarded = false; maxPeak = msg.peak[j] > maxPeak ? msg.peak[j] : maxPeak; printf("%...@%f ", msg.peak[j], mT); } - else + else { + discarded = true; printf("%...@%f discarded\n", msg.peak[j], mT); + } #endif } } // while @@ -708,7 +712,7 @@ #ifdef AUTOMATIC_VOLUME bool AVActive; gPrefs->Read(wxT("/AudioIO/AutomaticVolumeRecord"), &AVActive, false); - if (AVActive && gAudioIO->AVIsActive() && mIsInput) { + if (AVActive && gAudioIO->AVIsActive() && mIsInput && !discarded) { gAudioIO->AVProcess(maxPeak); putchar('\n'); } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs