Update of /cvsroot/audacity/audacity-src/src/effects In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7019
Modified Files: Generator.cpp Log Message: this should be the right way to check if there is enough empty space to generate something when we can't move clips (the other solution would only work with spaces before the track start and not with spaces in the middle). Index: Generator.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/effects/Generator.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Generator.cpp 26 Jul 2009 18:12:16 -0000 1.10 +++ Generator.cpp 26 Jul 2009 21:03:43 -0000 1.11 @@ -49,7 +49,10 @@ bool editClipCanMove; gPrefs->Read(wxT("/GUI/EditClipCanMove"), &editClipCanMove, true); - if (!editClipCanMove && mT0 < track->GetStartTime() && mT0 + mDuration > track->GetStartTime()) { + //if we can't move clips, check if generation is done on an empty place with enough + //duration before actually generate anything. + if (!editClipCanMove && track->IsEmpty(mT0, mT0+1.0/track->GetRate()) && + !track->IsEmpty(mT0, mT0+mDuration-1.0/track->GetRate())) { wxMessageBox( _("There is not enough room available to generate the audio"), _("Error"), wxICON_STOP); ------------------------------------------------------------------------------ _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs