mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
2096: Windows & Mac high quality Change Pitch/Tempo preview
Problem: Preview plays the original, and removes the selection. This appears to have been caused by the commit: 0aad028 Fix: revert that commit. Note that in the #ifdef EXPERIMENTAL_SPECTRAL_EDITING code has not been reinstated. I have not looked at why the commit caused the problem, just reverted it.
This commit is contained in:
parent
1866be6145
commit
fe22b2ae22
@ -211,11 +211,12 @@ 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, false);
|
||||
return Delegate(proxy, mUIParent, ®ion, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -197,10 +197,11 @@ 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, false);
|
||||
success = Delegate(proxy, mUIParent, ®ion, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -1180,7 +1180,6 @@ bool Effect::DoEffect(wxWindow *parent,
|
||||
|
||||
mOutputTracks.reset();
|
||||
|
||||
mpSelectedRegion = selectedRegion;
|
||||
mFactory = factory;
|
||||
mProjectRate = projectRate;
|
||||
mTracks = list;
|
||||
@ -1289,10 +1288,11 @@ bool Effect::DoEffect(wxWindow *parent,
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
bool Effect::Delegate( Effect &delegate, wxWindow *parent, bool shouldPrompt)
|
||||
bool Effect::Delegate( Effect &delegate,
|
||||
wxWindow *parent, SelectedRegion *selectedRegion, bool shouldPrompt)
|
||||
{
|
||||
return delegate.DoEffect( parent, mProjectRate, mTracks, mFactory,
|
||||
mpSelectedRegion, shouldPrompt );
|
||||
selectedRegion, shouldPrompt );
|
||||
}
|
||||
|
||||
// All legacy effects should have this overridden
|
||||
|
@ -249,7 +249,8 @@ class AUDACITY_DLL_API Effect /* not final */ : public wxEvtHandler,
|
||||
TrackFactory *factory, SelectedRegion *selectedRegion,
|
||||
bool shouldPrompt = true);
|
||||
|
||||
bool Delegate( Effect &delegate, wxWindow *parent, bool shouldPrompt);
|
||||
bool Delegate( Effect &delegate,
|
||||
wxWindow *parent, SelectedRegion *selectedRegion, bool shouldPrompt);
|
||||
|
||||
// Realtime Effect Processing
|
||||
/* not virtual */ bool RealtimeAddProcessor(int group, unsigned chans, float rate);
|
||||
@ -457,7 +458,6 @@ 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.
|
||||
|
@ -968,7 +968,8 @@ bool NyquistEffect::ShowInterface(wxWindow *parent, bool forceModal)
|
||||
|
||||
effect.SetCommand(mInputCmd);
|
||||
effect.mDebug = (mUIResultID == eDebugID);
|
||||
bool result = Delegate(effect, parent, true);
|
||||
SelectedRegion region(mT0, mT1);
|
||||
bool result = Delegate(effect, parent, ®ion, true);
|
||||
mT0 = effect.mT0;
|
||||
mT1 = effect.mT1;
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user