1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

Pass name of proxy effect to EffectSBSMS

Allows progress bar to show meaningful title when using SBSMS
time stretching in Change Pitch/Tempo.
This commit is contained in:
Steve Daulton
2016-08-16 14:54:02 +01:00
parent 19fa6d2833
commit 7b14e68b37
3 changed files with 10 additions and 0 deletions

View File

@@ -185,6 +185,7 @@ bool EffectChangePitch::Process()
double pitchRatio = 1.0 + m_dPercentChange / 100.0; double pitchRatio = 1.0 + m_dPercentChange / 100.0;
SelectedRegion region(mT0, mT1); SelectedRegion region(mT0, mT1);
EffectSBSMS proxy; EffectSBSMS proxy;
proxy.mProxyEffectName = XO("High Quality Pitch Change");
proxy.setParameters(1.0, pitchRatio); proxy.setParameters(1.0, pitchRatio);
return proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, &region, false); return proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, &region, false);

View File

@@ -173,6 +173,7 @@ bool EffectChangeTempo::Process()
double tempoRatio = 1.0 + m_PercentChange / 100.0; double tempoRatio = 1.0 + m_PercentChange / 100.0;
SelectedRegion region(mT0, mT1); SelectedRegion region(mT0, mT1);
EffectSBSMS proxy; EffectSBSMS proxy;
proxy.mProxyEffectName = XO("High Quality Tempo Change");
proxy.setParameters(tempoRatio, 1.0); proxy.setParameters(tempoRatio, 1.0);
success = proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, &region, false); success = proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, &region, false);
} }

View File

@@ -31,6 +31,11 @@ public:
void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio) void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime); static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
static double getRate(double rateStart, double rateEnd, SlideType slideType, double t); static double getRate(double rateStart, double rateEnd, SlideType slideType, double t);
protected:
wxString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") };
wxString GetName() override { return mProxyEffectName; };
private: private:
bool ProcessLabelTrack(Track *track); bool ProcessLabelTrack(Track *track);
double rateStart, rateEnd, pitchStart, pitchEnd; double rateStart, rateEnd, pitchStart, pitchEnd;
@@ -41,6 +46,9 @@ private:
double mCurT0; double mCurT0;
double mCurT1; double mCurT1;
float mTotalStretch; float mTotalStretch;
friend class EffectChangeTempo;
friend class EffectChangePitch;
}; };
#endif #endif