1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-23 06:35:50 +01:00

Exception safety in: some effects and generators...

... Those that directly call WaveTrack functions in their Process() routines,
which might throw exceptions for disk space exhaustion.
This commit is contained in:
Paul Licameli
2016-12-15 07:30:14 -05:00
parent 1fad6292a2
commit 22a12c6852
15 changed files with 106 additions and 97 deletions

View File

@@ -103,10 +103,9 @@ bool EffectSimpleMono::ProcessOne(WaveTrack * track,
track->Get((samplePtr) buffer.get(), floatSample, s, block);
//Process the buffer. If it fails, clean up and exit.
if (!ProcessSimpleMono(buffer.get(), block)) {
if (!ProcessSimpleMono(buffer.get(), block))
//Return false because the effect failed.
return false;
}
//Processing succeeded. copy the newly-changed samples back
//onto the track.
@@ -118,9 +117,8 @@ bool EffectSimpleMono::ProcessOne(WaveTrack * track,
//Update the Progress meter
if (TrackProgress(mCurTrackNum,
(s - start).as_double() /
len)) {
len))
return false;
}
}
//Return true because the effect processing succeeded.