mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-16 16:47:41 +02:00
Fewer calls to Effect::FindProject when only rate is needed
This commit is contained in:
parent
314ede2137
commit
4385326e9d
@ -98,7 +98,6 @@
|
|||||||
#include "../FFT.h"
|
#include "../FFT.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../ProjectSettings.h"
|
|
||||||
#include "../TrackArtist.h"
|
#include "../TrackArtist.h"
|
||||||
#include "../WaveClip.h"
|
#include "../WaveClip.h"
|
||||||
#include "../ViewInfo.h"
|
#include "../ViewInfo.h"
|
||||||
@ -739,7 +738,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||||||
mHiFreq =
|
mHiFreq =
|
||||||
(t
|
(t
|
||||||
? t->GetRate()
|
? t->GetRate()
|
||||||
: ProjectSettings::Get( *FindProject() ).GetRate())
|
: mProjectRate)
|
||||||
/ 2.0;
|
/ 2.0;
|
||||||
mLoFreq = loFreqI;
|
mLoFreq = loFreqI;
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ a graph for EffectScienFilter.
|
|||||||
#include "../PlatformCompatibility.h"
|
#include "../PlatformCompatibility.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../ProjectSettings.h"
|
|
||||||
#include "../Shuttle.h"
|
#include "../Shuttle.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
#include "../WaveTrack.h"
|
#include "../WaveTrack.h"
|
||||||
@ -334,7 +333,7 @@ bool EffectScienFilter::Init()
|
|||||||
mNyquist =
|
mNyquist =
|
||||||
(t
|
(t
|
||||||
? t->GetRate()
|
? t->GetRate()
|
||||||
: ProjectSettings::Get( *FindProject() ).GetRate())
|
: mProjectRate)
|
||||||
/ 2.0;
|
/ 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
|||||||
6, &mFrequency[0],
|
6, &mFrequency[0],
|
||||||
NumValidatorStyle::NO_TRAILING_ZEROES,
|
NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||||
MIN_StartFreq,
|
MIN_StartFreq,
|
||||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
mProjectRate / 2.0
|
||||||
)
|
)
|
||||||
.AddTextBox( {}, wxT(""), 12);
|
.AddTextBox( {}, wxT(""), 12);
|
||||||
}
|
}
|
||||||
@ -386,7 +386,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
|||||||
6, &mFrequency[1],
|
6, &mFrequency[1],
|
||||||
NumValidatorStyle::NO_TRAILING_ZEROES,
|
NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||||
MIN_EndFreq,
|
MIN_EndFreq,
|
||||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
mProjectRate / 2.0
|
||||||
)
|
)
|
||||||
.AddTextBox( {}, wxT(""), 12);
|
.AddTextBox( {}, wxT(""), 12);
|
||||||
}
|
}
|
||||||
@ -430,7 +430,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
|||||||
t = S.Validator<FloatingPointValidator<double>>(
|
t = S.Validator<FloatingPointValidator<double>>(
|
||||||
6, &mFrequency[0], NumValidatorStyle::NO_TRAILING_ZEROES,
|
6, &mFrequency[0], NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||||
MIN_Frequency,
|
MIN_Frequency,
|
||||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
mProjectRate / 2.0
|
||||||
)
|
)
|
||||||
.AddTextBox(XO("Frequency (Hz):"), wxT(""), 12);
|
.AddTextBox(XO("Frequency (Hz):"), wxT(""), 12);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user