mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-16 08:34:10 +02:00
Better fix for bug 604, not losing the repaired track.
This commit is contained in:
parent
aac65490f9
commit
2dca704213
@ -69,6 +69,7 @@ bool EffectRepair::Process()
|
|||||||
double repair_t1 = mT1;
|
double repair_t1 = mT1;
|
||||||
repair_t0 = (repair_t0 < trackStart? trackStart: repair_t0);
|
repair_t0 = (repair_t0 < trackStart? trackStart: repair_t0);
|
||||||
repair_t1 = (repair_t1 > trackEnd? trackEnd: repair_t1);
|
repair_t1 = (repair_t1 > trackEnd? trackEnd: repair_t1);
|
||||||
|
if (repair_t0 < repair_t1) { // selection is within track audio
|
||||||
double rate = track->GetRate();
|
double rate = track->GetRate();
|
||||||
double repair_deltat = repair_t1 - repair_t0;
|
double repair_deltat = repair_t1 - repair_t0;
|
||||||
|
|
||||||
@ -94,8 +95,6 @@ bool EffectRepair::Process()
|
|||||||
sampleCount repairStart = (sampleCount)(repair0 - s0);
|
sampleCount repairStart = (sampleCount)(repair0 - s0);
|
||||||
sampleCount repairLen = (sampleCount)(repair1 - repair0);
|
sampleCount repairLen = (sampleCount)(repair1 - repair0);
|
||||||
sampleCount len = (sampleCount)(s1 - s0);
|
sampleCount len = (sampleCount)(s1 - s0);
|
||||||
if (len < 0)
|
|
||||||
break; // FIX-ME: This failsafes bug 604, but does not account for why it actually happens.
|
|
||||||
|
|
||||||
if (repairLen > 128) {
|
if (repairLen > 128) {
|
||||||
::wxMessageBox(_("The Repair effect is intended to be used on very short sections of damaged audio (up to 128 samples).\n\nZoom in and select a tiny fraction of a second to repair."));
|
::wxMessageBox(_("The Repair effect is intended to be used on very short sections of damaged audio (up to 128 samples).\n\nZoom in and select a tiny fraction of a second to repair."));
|
||||||
@ -115,6 +114,7 @@ bool EffectRepair::Process()
|
|||||||
bGoodResult = false;
|
bGoodResult = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
track = (WaveTrack *) iter.Next();
|
track = (WaveTrack *) iter.Next();
|
||||||
count++;
|
count++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user