mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-09 22:53:55 +01:00
Make old Noise Removal effect compilable again
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../FileNames.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -153,9 +154,9 @@ bool EffectNoiseRemoval::CheckWhetherSkipEffect()
|
||||
return (mLevel == 0);
|
||||
}
|
||||
|
||||
bool EffectNoiseRemoval::PromptUser()
|
||||
bool EffectNoiseRemoval::PromptUser(wxWindow *parent)
|
||||
{
|
||||
NoiseRemovalDialog dlog(this, mParent);
|
||||
NoiseRemovalDialog dlog(this, parent);
|
||||
dlog.mSensitivity = mSensitivity;
|
||||
dlog.mGain = -mNoiseGain;
|
||||
dlog.mFreq = mFreqSmoothingHz;
|
||||
@@ -614,13 +615,12 @@ bool EffectNoiseRemoval::ProcessOne(int count, WaveTrack * track,
|
||||
double tLen = mOutputTrack->LongSamplesToTime(len);
|
||||
// Filtering effects always end up with more data than they started with. Delete this 'tail'.
|
||||
mOutputTrack->HandleClear(tLen, mOutputTrack->GetEndTime(), false, false);
|
||||
bool bResult = track->ClearAndPaste(t0, t0 + tLen, mOutputTrack, true, false);
|
||||
bool bResult = track->ClearAndPaste(t0, t0 + tLen, mOutputTrack.get(), true, false);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
}
|
||||
|
||||
// Delete the outputTrack now that its data is inserted in place
|
||||
delete mOutputTrack;
|
||||
mOutputTrack = NULL;
|
||||
mOutputTrack.reset();
|
||||
}
|
||||
|
||||
return bLoopSuccess;
|
||||
@@ -680,8 +680,8 @@ BEGIN_EVENT_TABLE(NoiseRemovalDialog,wxDialog)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
NoiseRemovalDialog::NoiseRemovalDialog(EffectNoiseRemoval * effect,
|
||||
wxWindow *parent) :
|
||||
EffectDialog( parent, _("Noise Removal"), PROCESS_EFFECT)
|
||||
wxWindow *parent)
|
||||
: EffectDialog( parent, _("Noise Removal"), EffectTypeProcess)
|
||||
{
|
||||
m_pEffect = effect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user