mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-22 15:20:15 +02:00
Merge branch 'master' into deletes
This commit is contained in:
commit
dc7c4383fc
@ -2025,6 +2025,8 @@ int AudacityApp::OnExit()
|
||||
|
||||
DeinitFFT();
|
||||
|
||||
DeinitAudioIO();
|
||||
|
||||
// Terminate the PluginManager (must be done before deleting the locale)
|
||||
PluginManager::Get().Terminate();
|
||||
|
||||
|
@ -943,6 +943,11 @@ void InitAudioIO()
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
void DeinitAudioIO()
|
||||
{
|
||||
ugAudioIO.reset();
|
||||
}
|
||||
|
||||
wxString DeviceName(const PaDeviceInfo* info)
|
||||
{
|
||||
wxString infoName = wxSafeConvertMB2WX(info->name);
|
||||
|
@ -62,6 +62,7 @@ using WaveTrackArray = std::vector < WaveTrack* >;
|
||||
extern AUDACITY_DLL_API AudioIO *gAudioIO;
|
||||
|
||||
void InitAudioIO();
|
||||
void DeinitAudioIO();
|
||||
wxString DeviceName(const PaDeviceInfo* info);
|
||||
wxString HostName(const PaDeviceInfo* info);
|
||||
bool ValidateDeviceNames();
|
||||
|
@ -185,6 +185,7 @@ bool EffectChangePitch::Process()
|
||||
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 proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
||||
|
@ -173,6 +173,7 @@ bool EffectChangeTempo::Process()
|
||||
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 = proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
||||
}
|
||||
@ -229,13 +230,13 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
|
||||
FloatingPointValidator<double> vldFromBPM(3, &m_FromBPM, NUM_VAL_THREE_TRAILING_ZEROES | NUM_VAL_ZERO_AS_BLANK);
|
||||
m_pTextCtrl_FromBPM = S.Id(ID_FromBPM)
|
||||
.AddTextBox(_("from"), wxT(""), 12);
|
||||
m_pTextCtrl_FromBPM->SetName(_("From beats per minute"));
|
||||
m_pTextCtrl_FromBPM->SetName(_("Beats per minute, from"));
|
||||
m_pTextCtrl_FromBPM->SetValidator(vldFromBPM);
|
||||
|
||||
FloatingPointValidator<double> vldToBPM(3, &m_ToBPM, NUM_VAL_THREE_TRAILING_ZEROES | NUM_VAL_ZERO_AS_BLANK);
|
||||
m_pTextCtrl_ToBPM = S.Id(ID_ToBPM)
|
||||
.AddTextBox(_("to"), wxT(""), 12);
|
||||
m_pTextCtrl_ToBPM->SetName(_("To beats per minute"));
|
||||
m_pTextCtrl_ToBPM->SetName(_("Beats per minute, to"));
|
||||
m_pTextCtrl_ToBPM->SetValidator(vldToBPM);
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
@ -251,7 +252,6 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
|
||||
FloatingPointValidator<double> vldFromLength(precission, &m_FromLength, NUM_VAL_TWO_TRAILING_ZEROES);
|
||||
m_pTextCtrl_FromLength = S.Id(ID_FromLength)
|
||||
.AddTextBox(_("from"), wxT(""), 12);
|
||||
m_pTextCtrl_FromLength->SetName(_("From length in seconds"));
|
||||
m_pTextCtrl_FromLength->SetValidator(vldFromLength);
|
||||
m_pTextCtrl_FromLength->Enable(false); // Disable because the value comes from the user selection.
|
||||
|
||||
@ -266,7 +266,6 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
|
||||
vldToLength.SetRange(minLength, maxLength);
|
||||
m_pTextCtrl_ToLength = S.Id(ID_ToLength)
|
||||
.AddTextBox(_("to"), wxT(""), 12);
|
||||
m_pTextCtrl_ToLength->SetName(_("To length in seconds"));
|
||||
m_pTextCtrl_ToLength->SetValidator(vldToLength);
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
@ -308,6 +307,10 @@ bool EffectChangeTempo::TransferDataToWindow()
|
||||
|
||||
m_bLoopDetect = false;
|
||||
|
||||
// Set the accessibility name here because we need m_pTextCtrl_FromLength to have had its value set
|
||||
m_pTextCtrl_ToLength->SetName(_("Length in seconds from") + wxT(" ") + m_pTextCtrl_FromLength->GetValue()
|
||||
+wxT(", ") + _("to"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,11 @@ public:
|
||||
void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
|
||||
static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
|
||||
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:
|
||||
bool ProcessLabelTrack(Track *track);
|
||||
double rateStart, rateEnd, pitchStart, pitchEnd;
|
||||
@ -41,6 +46,9 @@ private:
|
||||
double mCurT0;
|
||||
double mCurT1;
|
||||
float mTotalStretch;
|
||||
|
||||
friend class EffectChangeTempo;
|
||||
friend class EffectChangePitch;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1800,8 +1800,19 @@ void NumericTextCtrl::Updated(bool keyup /* = false */)
|
||||
|
||||
void NumericTextCtrl::ValueToControls()
|
||||
{
|
||||
const wxString previousValueString = mValueString;
|
||||
NumericConverter::ValueToControls(mValue);
|
||||
Refresh(false);
|
||||
if (mValueString != previousValueString) {
|
||||
// Doing this only when needed is an optimization.
|
||||
// NumerixTextCtrls are used in the selection bar at the bottom
|
||||
// of Audacity, and are updated at high frequency through
|
||||
// SetValue() when Audacity is playing. This consumes a
|
||||
// significant amount of CPU. Typically, when a track is
|
||||
// playing, only one of the NumericTextCtrl actually changes
|
||||
// (the audio position). We save CPU by updating the control
|
||||
// only when needed.
|
||||
Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,9 +66,16 @@ public:
|
||||
|
||||
virtual ~NumericConverter();
|
||||
|
||||
// ValueToControls() formats a raw value (either provided as
|
||||
// argument, or mValue, depending on the version of the function
|
||||
// called). The result is stored to mValueString.
|
||||
virtual void ValueToControls();
|
||||
virtual void ValueToControls(double rawValue, bool nearest = true);
|
||||
|
||||
// Converts the stored formatted string (mValueString) back to a
|
||||
// raw value (mValue).
|
||||
virtual void ControlsToValue();
|
||||
|
||||
virtual void ParseFormatString(const wxString & format);
|
||||
|
||||
void PrintDebugInfo();
|
||||
@ -115,6 +122,7 @@ protected:
|
||||
wxString mPrefix;
|
||||
wxString mValueTemplate;
|
||||
wxString mValueMask;
|
||||
// Formatted mValue, by ValueToControls().
|
||||
wxString mValueString;
|
||||
|
||||
double mScalingFactor;
|
||||
@ -181,6 +189,9 @@ private:
|
||||
void OnFocus(wxFocusEvent &event);
|
||||
void OnContext(wxContextMenuEvent &event);
|
||||
|
||||
// Formats mValue into mValueString, using the method of the base class.
|
||||
// Triggers a refresh of the wx window only when the value actually
|
||||
// changed since last time a refresh was triggered.
|
||||
void ValueToControls() override;
|
||||
void ControlsToValue() override;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Building Audacity(R) for Microsoft Windows(R)
|
||||
Copyright (c) 1999-2015 Audacity Team
|
||||
Copyright (c) 1999-2016 Audacity Team
|
||||
|
||||
Authors:
|
||||
Asger Ottar Alstrup
|
||||
@ -48,10 +48,18 @@ wxWidgets from http://www.wxwidgets.org/.
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
MSVC++ STEP 2: Build wxWidgets
|
||||
MSVC++ STEP 2: Download source code for Audacity
|
||||
------------------------------------------------------------------------
|
||||
|
||||
2.1. Open "C:\wxWidgets-3.0.2\build\msw\wx_dll.dsw" with
|
||||
Checkout the latest Audacity code from our GitHub repository
|
||||
at https://github.com/audacity/audacity/ (see GitHub for help).
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
MSVC++ STEP 3: Build wxWidgets
|
||||
------------------------------------------------------------------------
|
||||
|
||||
3.1. Open "C:\wxWidgets-3.0.2\build\msw\wx_dll.dsw" with
|
||||
Microsoft Visual Studio.
|
||||
Make sure to use wx_dll.dsw, not wx.dsw, because wx.dsw
|
||||
does not have the correct dependencies for the DLL builds.
|
||||
@ -61,7 +69,7 @@ MSVC++ STEP 2: Build wxWidgets
|
||||
"C\wxWidgets-3.0.2\build\msw\wx_dll.sln" instead of wx_dll.dsw.
|
||||
|
||||
|
||||
2.2. We have patched wxWidgets with four patches. You should apply all
|
||||
3.2. We have patched wxWidgets with four patches. You should apply all
|
||||
four. You can do this in one step by copying the folder
|
||||
"audacity\win\wxWidgets_additions\wxWidgets-3.0.2\"
|
||||
over your:
|
||||
@ -91,7 +99,7 @@ MSVC++ STEP 2: Build wxWidgets
|
||||
features.
|
||||
|
||||
|
||||
2.3. Build wxWidgets for all configurations of Audacity that you want.
|
||||
3.3. Build wxWidgets for all configurations of Audacity that you want.
|
||||
|
||||
* Use the "DLL Release" configuration to use in a
|
||||
"Release" version of Audacity.
|
||||
@ -132,13 +140,6 @@ MSVC++ STEP 2: Build wxWidgets
|
||||
wxbase30*_odbc*.* dbgrid.
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
MSVC++ STEP 3: Download source code for Audacity
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Checkout the latest Audacity code from our GitHub repository
|
||||
at https://github.com/audacity/audacity/ (see GitHub for help).
|
||||
|
||||
------------------------------------------------------------------------
|
||||
MSVC++ STEP 4: Set wxWidgets location for Audacity
|
||||
------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user