Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2309
Modified Files: WaveTrack.cpp WaveTrack.h Log Message: Vidyashankar Vellal's work on making Reverse do sensible things with multiple clips and labels. Index: WaveTrack.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.h,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- WaveTrack.h 11 Oct 2009 14:55:47 -0000 1.76 +++ WaveTrack.h 20 Oct 2009 23:29:17 -0000 1.77 @@ -306,6 +306,12 @@ void MoveClipToTrack(int clipIndex, WaveTrack* dest); void MoveClipToTrack(WaveClip *clip, WaveTrack* dest); + // Remove the clip from the track and return a pointer to it. + WaveClip* RemoveAndReturnClip(WaveClip* clip); + + // Append a clip to the track + void AddClip(WaveClip* clip); + // Merge two clips, that is append data from clip2 to clip1, // then remove clip2 from track. // clipidx1 and clipidx2 are indices into the clip list. Index: WaveTrack.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v retrieving revision 1.170 retrieving revision 1.171 diff -u -d -r1.170 -r1.171 --- WaveTrack.cpp 18 Oct 2009 19:58:17 -0000 1.170 +++ WaveTrack.cpp 20 Oct 2009 23:29:17 -0000 1.171 @@ -708,6 +708,21 @@ return HandleClear(t0, t1, addCutLines, split); } +WaveClip* WaveTrack::RemoveAndReturnClip(WaveClip* clip) +{ + wxWaveClipListNode* node = mClips.Find(clip); + WaveClip* clipReturn = node->GetData(); + mClips.DeleteNode(node); + return clipReturn; +} + +void WaveTrack::AddClip(WaveClip* clip) +{ + // Uncomment the following line after we correct the problem of zero-length clips + //if (CanInsertClip(clip)) + mClips.Append(clip); +} + bool WaveTrack::HandleGroupClear(double t0, double t1, bool addCutLines, bool split, TrackList* tracks) { // get tracks ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs