1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-31 16:09:28 +02:00

Revert "2096: Windows & Mac high quality Change Pitch/Tempo preview"

This reverts commit fe22b2ae228ebd79f1ea0161bd33eb4ef2a47bf1.
This commit is contained in:
Paul Licameli 2019-04-20 10:24:04 -04:00
parent 9eab996489
commit fe1be2b6a8
5 changed files with 8 additions and 11 deletions

View File

@ -211,12 +211,11 @@ bool EffectChangePitch::Process()
if (mUseSBSMS)
{
double pitchRatio = 1.0 + m_dPercentChange / 100.0;
SelectedRegion region(mT0, mT1);
EffectSBSMS proxy;
proxy.mProxyEffectName = XO("High Quality Pitch Change");
proxy.setParameters(1.0, pitchRatio);
return Delegate(proxy, mUIParent, &region, false);
return Delegate(proxy, mUIParent, false);
}
else
#endif

View File

@ -197,11 +197,10 @@ bool EffectChangeTempo::Process()
if (mUseSBSMS)
{
double tempoRatio = 1.0 + m_PercentChange / 100.0;
SelectedRegion region(mT0, mT1);
EffectSBSMS proxy;
proxy.mProxyEffectName = XO("High Quality Tempo Change");
proxy.setParameters(tempoRatio, 1.0);
success = Delegate(proxy, mUIParent, &region, false);
success = Delegate(proxy, mUIParent, false);
}
else
#endif

View File

@ -1180,6 +1180,7 @@ bool Effect::DoEffect(wxWindow *parent,
mOutputTracks.reset();
mpSelectedRegion = selectedRegion;
mFactory = factory;
mProjectRate = projectRate;
mTracks = list;
@ -1288,11 +1289,10 @@ bool Effect::DoEffect(wxWindow *parent,
return returnVal;
}
bool Effect::Delegate( Effect &delegate,
wxWindow *parent, SelectedRegion *selectedRegion, bool shouldPrompt)
bool Effect::Delegate( Effect &delegate, wxWindow *parent, bool shouldPrompt)
{
return delegate.DoEffect( parent, mProjectRate, mTracks, mFactory,
selectedRegion, shouldPrompt );
mpSelectedRegion, shouldPrompt );
}
// All legacy effects should have this overridden

View File

@ -249,8 +249,7 @@ class AUDACITY_DLL_API Effect /* not final */ : public wxEvtHandler,
TrackFactory *factory, SelectedRegion *selectedRegion,
bool shouldPrompt = true);
bool Delegate( Effect &delegate,
wxWindow *parent, SelectedRegion *selectedRegion, bool shouldPrompt);
bool Delegate( Effect &delegate, wxWindow *parent, bool shouldPrompt);
// Realtime Effect Processing
/* not virtual */ bool RealtimeAddProcessor(int group, unsigned chans, float rate);
@ -458,6 +457,7 @@ protected:
double mProjectRate; // Sample rate of the project - NEW tracks should
// be created with this rate...
double mSampleRate;
SelectedRegion *mpSelectedRegion{};
TrackFactory *mFactory;
const TrackList *inputTracks() const { return mTracks; }
std::shared_ptr<TrackList> mOutputTracks; // used only if CopyInputTracks() is called.

View File

@ -968,8 +968,7 @@ bool NyquistEffect::ShowInterface(wxWindow *parent, bool forceModal)
effect.SetCommand(mInputCmd);
effect.mDebug = (mUIResultID == eDebugID);
SelectedRegion region(mT0, mT1);
bool result = Delegate(effect, parent, &region, true);
bool result = Delegate(effect, parent, true);
mT0 = effect.mT0;
mT1 = effect.mT1;
return result;