mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Should fix the invalid initial duration for generator effects
This commit is contained in:
parent
80c3705e7c
commit
835000d916
@ -62,7 +62,6 @@ EffectDtmf::EffectDtmf()
|
||||
dtmfDutyCycle = DEF_DutyCycle;
|
||||
dtmfAmplitude = DEF_Amplitude;
|
||||
dtmfString = DEF_Sequence;
|
||||
mDuration = GetDefaultDuration();
|
||||
dtmfTone = 0.0;
|
||||
dtmfSilence = 0.0;
|
||||
}
|
||||
|
@ -961,9 +961,7 @@ bool Effect::DoEffect(wxWindow *parent,
|
||||
SelectedRegion *selectedRegion,
|
||||
bool shouldPrompt /* = true */)
|
||||
{
|
||||
double t0 = selectedRegion->t0();
|
||||
double t1 = selectedRegion->t1();
|
||||
wxASSERT(t0 <= t1);
|
||||
wxASSERT(selectedRegion->duration() >= 0.0);
|
||||
|
||||
if (mOutputTracks)
|
||||
{
|
||||
@ -975,8 +973,9 @@ bool Effect::DoEffect(wxWindow *parent,
|
||||
mProjectRate = projectRate;
|
||||
mParent = parent;
|
||||
mTracks = list;
|
||||
mT0 = t0;
|
||||
mT1 = t1;
|
||||
mT0 = selectedRegion->t0();
|
||||
mT1 = selectedRegion->t1();
|
||||
mDuration = GetDuration();
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
mF0 = selectedRegion->f0();
|
||||
mF1 = selectedRegion->f1();
|
||||
|
@ -24,12 +24,9 @@
|
||||
class Generator : public Effect
|
||||
{
|
||||
public:
|
||||
Generator() : mDuration(GetDefaultDuration()) { }
|
||||
Generator() { }
|
||||
|
||||
protected:
|
||||
// Amount of time to generate, in seconds
|
||||
double mDuration;
|
||||
|
||||
// [ GenerateTrack() must be overridden by the actual generator class ]
|
||||
// Precondition: mDuration > 0.0
|
||||
// Postcondition: <tmp> is filled with the data intended for <track>
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
EffectSilence::EffectSilence()
|
||||
{
|
||||
mDuration = GetDuration();
|
||||
}
|
||||
|
||||
EffectSilence::~EffectSilence()
|
||||
|
@ -94,7 +94,6 @@ EffectToneGen::EffectToneGen(bool isChirp)
|
||||
mAmplitude[0] = DEF_StartAmp;
|
||||
mAmplitude[1] = DEF_EndAmp;
|
||||
mInterpolation = DEF_Interp;
|
||||
mDuration = GetDuration();
|
||||
|
||||
for (int i = 0; i < kNumWaveforms; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user