mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29: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 "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../TrackArtist.h"
|
||||
#include "../WaveClip.h"
|
||||
#include "../ViewInfo.h"
|
||||
@ -739,7 +738,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
||||
mHiFreq =
|
||||
(t
|
||||
? t->GetRate()
|
||||
: ProjectSettings::Get( *FindProject() ).GetRate())
|
||||
: mProjectRate)
|
||||
/ 2.0;
|
||||
mLoFreq = loFreqI;
|
||||
|
||||
|
@ -56,7 +56,6 @@ a graph for EffectScienFilter.
|
||||
#include "../PlatformCompatibility.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../Shuttle.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../WaveTrack.h"
|
||||
@ -334,7 +333,7 @@ bool EffectScienFilter::Init()
|
||||
mNyquist =
|
||||
(t
|
||||
? t->GetRate()
|
||||
: ProjectSettings::Get( *FindProject() ).GetRate())
|
||||
: mProjectRate)
|
||||
/ 2.0;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
||||
6, &mFrequency[0],
|
||||
NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||
MIN_StartFreq,
|
||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
||||
mProjectRate / 2.0
|
||||
)
|
||||
.AddTextBox( {}, wxT(""), 12);
|
||||
}
|
||||
@ -386,7 +386,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
||||
6, &mFrequency[1],
|
||||
NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||
MIN_EndFreq,
|
||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
||||
mProjectRate / 2.0
|
||||
)
|
||||
.AddTextBox( {}, wxT(""), 12);
|
||||
}
|
||||
@ -430,7 +430,7 @@ void EffectToneGen::PopulateOrExchange(ShuttleGui & S)
|
||||
t = S.Validator<FloatingPointValidator<double>>(
|
||||
6, &mFrequency[0], NumValidatorStyle::NO_TRAILING_ZEROES,
|
||||
MIN_Frequency,
|
||||
ProjectSettings::Get( *FindProject() ).GetRate() / 2.0
|
||||
mProjectRate / 2.0
|
||||
)
|
||||
.AddTextBox(XO("Frequency (Hz):"), wxT(""), 12);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user