Update of /cvsroot/audacity/audacity-src/src/effects In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17420/src/effects
Modified Files: NoiseRemoval.cpp Log Message: Fix noise removal alignment problems when selection is longer than track length. Index: NoiseRemoval.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/effects/NoiseRemoval.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- NoiseRemoval.cpp 16 Aug 2009 14:44:20 -0000 1.63 +++ NoiseRemoval.cpp 22 Nov 2009 22:52:15 -0000 1.64 @@ -677,11 +677,13 @@ mOutputTrack->Flush(); // Take the output track and insert it in place of the original - // sample data + // sample data (as operated on -- this may not match mT0/mT1) if (bLoopSuccess) { + double t0 = mOutputTrack->LongSamplesToTime(start); + double tLen = mOutputTrack->LongSamplesToTime(len); // Filtering effects always end up with more data than they started with. Delete this 'tail'. - mOutputTrack->HandleClear(mT1 - mT0, mOutputTrack->GetEndTime(), false, false); - track->ClearAndPaste(mT0, mT1, mOutputTrack, true, false); + mOutputTrack->HandleClear(tLen, mOutputTrack->GetEndTime(), false, false); + track->ClearAndPaste(t0, t0 + tLen, mOutputTrack, true, false); } // Delete the outputTrack now that its data is inserted in place ------------------------------------------------------------------------------ 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