mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 08:38:39 +02:00
Improving Progress bar messages to reflect what's actually happening
This commit is contained in:
parent
ebf54adaab
commit
52bc3fa8f7
@ -166,9 +166,9 @@ bool Effect::TotalProgress(double frac)
|
||||
return (updateResult != eProgressSuccess);
|
||||
}
|
||||
|
||||
bool Effect::TrackProgress(int whichTrack, double frac)
|
||||
bool Effect::TrackProgress(int whichTrack, double frac, wxString msg)
|
||||
{
|
||||
int updateResult = mProgress->Update(whichTrack + frac, (double) mNumTracks);
|
||||
int updateResult = mProgress->Update(whichTrack + frac, (double) mNumTracks, msg);
|
||||
return (updateResult != eProgressSuccess);
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ class AUDACITY_DLL_API Effect {
|
||||
|
||||
// Pass a fraction between 0.0 and 1.0, for the current track
|
||||
// (when doing one track at a time)
|
||||
bool TrackProgress(int whichTrack, double frac);
|
||||
bool TrackProgress(int whichTrack, double frac, wxString = wxT(""));
|
||||
|
||||
// Pass a fraction between 0.0 and 1.0, for the current track group
|
||||
// (when doing stereo groups at a time)
|
||||
|
@ -294,7 +294,7 @@ bool EffectNormalize::AnalyseDC(WaveTrack * track)
|
||||
|
||||
//Update the Progress meter
|
||||
if (TrackProgress(mCurTrackNum,
|
||||
((double)(s - start) / (len*2)))) {
|
||||
((double)(s - start) / (len*2)), wxT("Analysing DC offset..."))) {
|
||||
rc = false; //lda .. break, not return, so that buffer is deleted
|
||||
break;
|
||||
}
|
||||
@ -317,6 +317,17 @@ bool EffectNormalize::ProcessOne(WaveTrack * track)
|
||||
bool rc = true;
|
||||
sampleCount s;
|
||||
|
||||
wxString msg;
|
||||
if(mDC & mGain)
|
||||
msg = _("Removing offset and Normalizing...");
|
||||
else if(mDC & !mGain)
|
||||
msg = _("Removing offset...");
|
||||
else if(!mDC & mGain)
|
||||
msg = _("Normalizing without removing offset...");
|
||||
else if(!mDC & !mGain)
|
||||
msg = wxT("Not doing anything)..."); // shouldn't get here
|
||||
|
||||
|
||||
//Transform the marker timepoints to samples
|
||||
sampleCount start = track->TimeToLongSamples(mCurT0);
|
||||
sampleCount end = track->TimeToLongSamples(mCurT1);
|
||||
@ -355,7 +366,7 @@ bool EffectNormalize::ProcessOne(WaveTrack * track)
|
||||
|
||||
//Update the Progress meter
|
||||
if (TrackProgress(mCurTrackNum,
|
||||
((double)(s - start) / (len*2)))) {
|
||||
((double)(s - start) / (len*2)), msg)) {
|
||||
rc = false; //lda .. break, not return, so that buffer is deleted
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user