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

Modified Files:
        Meter.cpp 
Log Message:
Changing latency control from Portaudio's input latency to mT (OnMeterUpdate @ 
widgets/Meter.cpp) and Pa_GetStreamTime(mPortStreamV19) (AVProcess @ 
AudioIO.cpp).
Portaudio's input latency is neither cross-plataform nor stable. Reported by 
Leland.
Left uncommented printfs to help testing on different plataforms.

Index: Meter.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- Meter.cpp   14 Aug 2009 13:40:18 -0000      1.60
+++ Meter.cpp   15 Aug 2009 21:56:52 -0000      1.61
@@ -694,7 +694,12 @@
 
          mBar[j].tailPeakCount = msg.tailPeakCount[j];
 
-         maxPeak = mBar[j].peak > maxPeak ? mBar[j].peak : maxPeak;
+         if (mT > gAudioIO->AVGetLastDecisionTime()) {
+            maxPeak = mBar[j].peak > maxPeak ? mBar[j].peak : maxPeak;
+            printf("%...@%f ", mBar[j].peak, mT);
+         }
+         else
+            printf("%...@%f discarded\n", mBar[j].peak, mT);
       }
    } // while
 
@@ -702,8 +707,10 @@
       #ifdef AUTOMATIC_VOLUME
          bool AVActive;
          gPrefs->Read(wxT("/AudioIO/AutomaticVolumeRecord"), &AVActive, false);
-         if (AVActive && gAudioIO->AVIsActive() && mIsInput)
+         if (AVActive && gAudioIO->AVIsActive() && mIsInput) {
             gAudioIO->AVProcess(maxPeak);
+            putchar('\n');
+         }
       #endif
       RepaintBarsNow();
    }


------------------------------------------------------------------------------
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

Reply via email to