Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9815
Modified Files:
Envelope.cpp
Log Message:
Comment cleanup, spelling and more explicit usage guidelines for Insert()
Index: Envelope.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Envelope.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- Envelope.cpp 17 Oct 2008 03:07:49 -0000 1.59
+++ Envelope.cpp 4 Mar 2009 20:35:18 -0000 1.60
@@ -662,7 +662,7 @@
}
}
- // In theses statement, remember we subtracted mOffset from t0
+ // In these statements, remember we subtracted mOffset from t0
if( t0 < mTrackEpsilon )
atStart = true;
if( (mTrackLen - t0) < mTrackEpsilon )
@@ -837,10 +837,21 @@
// Although this renders the name a slight misnomer, a duplicate
// 'replaces' the current control point.
-// Envelopes start at zero and are offset by other things by mOffset.
-// This is worth remembering.
-// If you call 'Insert' from WaveClip, subtract mOffset from the time.
-// If you call it from Envelope, don't. Kind of makes sense. MJS.
+/** @brief Add a control point to the envelope
+ *
+ * Control point positions start at zero and are measured in seconds from the
+ * start of the envelope. The position of the envelope on the project-wide
+ * time scale is store in seconds in Envelope::mOffset.
+ * This is worth remembering.
+ * If you call Envelope::Insert() from WaveClip, or anywhere else outside the
+ * Envelope class that is using project timing, subtract the envelope's mOffset
+ * from the time.
+ * If you call Envelope::Insert() from within Envelope, don't subtract mOffset
+ * because you are working in relative time inside the envelope
+ * @param when the time in seconds when the envelope point should be created.
+ * @param value the envelope value to use at the given point.
+ * @return the index of the new envelope point within array of envelope points.
+ */
int Envelope::Insert(double when, double value)
{
// in debug builds, do a spot of argument checking
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs