mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-16 07:31:16 +02:00
Disallow non-numeric chars in numeric input boxes.
Patch by Ed using examples by Martyn & James.
This commit is contained in:
@@ -197,10 +197,10 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
|
||||
tempNames.Add(name);
|
||||
tempHash[code] = name;
|
||||
|
||||
wxLogDebug(wxT("code=%s name=%s fullCode=%s name=%s -> %s"),
|
||||
/* wxLogDebug(wxT("code=%s name=%s fullCode=%s name=%s -> %s"),
|
||||
code.c_str(), localLanguageName[code].c_str(),
|
||||
fullCode.c_str(), localLanguageName[fullCode].c_str(),
|
||||
name.c_str());
|
||||
name.c_str());*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -196,7 +196,7 @@ void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
|
||||
// the translatable strings to avoid breaking translations close to 2.0.
|
||||
// TODO: Make colon part of the translatable string after 2.0.
|
||||
S.TieChoice(_("Noise type") + wxString(wxT(":")), nType, nTypeList);
|
||||
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), nAmplitude, 10);
|
||||
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), nAmplitude, 10);
|
||||
S.AddPrompt(_("Duration") + wxString(wxT(":")));
|
||||
if (mNoiseDurationT == NULL)
|
||||
{
|
||||
|
@@ -70,6 +70,7 @@
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/valtext.h>
|
||||
|
||||
|
||||
#include "../AudacityApp.h"
|
||||
@@ -901,10 +902,12 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartMultiColumn(3, wxEXPAND);
|
||||
S.SetStretchyCol(2);
|
||||
{
|
||||
wxTextValidator vld(wxFILTER_NUMERIC);
|
||||
mGainT = S.Id(ID_GAIN_TEXT).AddTextBox(_("Noise re&duction (dB):"),
|
||||
wxT(""),
|
||||
0);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
mGainT->SetValidator(vld);
|
||||
mGainS = S.Id(ID_GAIN_SLIDER).AddSlider(wxT(""), 0, GAIN_MAX);
|
||||
mGainS->SetName(_("Noise reduction"));
|
||||
mGainS->SetRange(GAIN_MIN, GAIN_MAX);
|
||||
@@ -914,6 +917,7 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
wxT(""),
|
||||
0);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
mSensitivityT->SetValidator(vld);
|
||||
mSensitivityS = S.Id(ID_SENSITIVITY_SLIDER).AddSlider(wxT(""), 0, SENSITIVITY_MAX);
|
||||
mSensitivityS->SetName(_("Sensitivity"));
|
||||
mSensitivityS->SetRange(SENSITIVITY_MIN, SENSITIVITY_MAX);
|
||||
@@ -923,6 +927,7 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
wxT(""),
|
||||
0);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
mFreqT->SetValidator(vld);
|
||||
mFreqS = S.Id(ID_FREQ_SLIDER).AddSlider(wxT(""), 0, FREQ_MAX);
|
||||
mFreqS->SetName(_("Frequency smoothing"));
|
||||
mFreqS->SetRange(FREQ_MIN, FREQ_MAX);
|
||||
@@ -932,6 +937,7 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
wxT(""),
|
||||
0);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
mTimeT->SetValidator(vld);
|
||||
mTimeS = S.Id(ID_TIME_SLIDER).AddSlider(wxT(""), 0, TIME_MAX);
|
||||
mTimeS->SetName(_("Attack/decay time"));
|
||||
mTimeS->SetRange(TIME_MIN, TIME_MAX);
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/valtext.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -213,6 +214,7 @@ PhaserDialog::PhaserDialog(EffectPhaser * effect, wxWindow * parent)
|
||||
|
||||
void PhaserDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
wxTextValidator vld(wxFILTER_NUMERIC);
|
||||
S.SetBorder(10);
|
||||
S.StartHorizontalLay(wxCENTER, false);
|
||||
{
|
||||
@@ -224,33 +226,38 @@ void PhaserDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartMultiColumn(3, wxEXPAND);
|
||||
{
|
||||
wxSlider *s;
|
||||
wxTextCtrl * tempTC;
|
||||
S.SetStretchyCol(1);
|
||||
S.Id(ID_PHASER_STAGESTEXT).AddTextBox(_("Stages:"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_STAGESTEXT).AddTextBox(_("Stages:"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_STAGESSLIDER).AddSlider(wxT(""), 2, STAGES_MAX, STAGES_MIN);
|
||||
s->SetName(_("Stages"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASER_DRYWETTEXT).AddTextBox(_("Dry/Wet:"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_DRYWETTEXT).AddTextBox(_("Dry/Wet:"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_DRYWETSLIDER).AddSlider(wxT(""), 0, DRYWET_MAX, DRYWET_MIN);
|
||||
s->SetName(_("Dry Wet"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASER_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_FREQSLIDER).AddSlider(wxT(""), 100, FREQ_MAX, FREQ_MIN);
|
||||
s->SetName(_("LFO frequency in hertz"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASER_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_PHASESLIDER).AddSlider(wxT(""), 0, PHASE_MAX, PHASE_MIN);
|
||||
s->SetName(_("LFO start phase in degrees"));
|
||||
s->SetLineSize(10);
|
||||
@@ -258,16 +265,18 @@ void PhaserDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASER_DEPTHTEXT).AddTextBox(_("Depth:"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_DEPTHTEXT).AddTextBox(_("Depth:"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_DEPTHSLIDER).AddSlider(wxT(""), 0, DEPTH_MAX, DEPTH_MIN);
|
||||
s->SetName(_("Depth in percent"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASER_FEEDBACKTEXT).AddTextBox(_("Feedback (%):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASER_FEEDBACKTEXT).AddTextBox(_("Feedback (%):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASER_FEEDBACKSLIDER).AddSlider(wxT(""), 0, FB_MAX, FB_MIN);
|
||||
s->SetName(_("Feedback in percent"));
|
||||
s->SetLineSize(10);
|
||||
|
@@ -278,8 +278,8 @@ void ToneGenDialog::PopulateOrExchangeStandard( ShuttleGui & S )
|
||||
// The added colon to improve visual consistency was placed outside
|
||||
// the translatable strings to avoid breaking translations close to 2.0.
|
||||
// TODO: Make colon part of the translatable string after 2.0.
|
||||
S.TieTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
|
||||
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
|
||||
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
|
||||
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
|
||||
S.AddPrompt(_("Duration") + wxString(wxT(":")));
|
||||
if (mToneDurationT == NULL)
|
||||
{
|
||||
@@ -319,10 +319,10 @@ void ToneGenDialog::PopulateOrExchangeExtended( ShuttleGui & S )
|
||||
// The added colon to improve visual consistency was placed outside
|
||||
// the translatable strings to avoid breaking translations close to 2.0.
|
||||
// TODO: Make colon part of the translatable string after 2.0.
|
||||
S.TieTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 10)->SetName(_("Frequency Hertz Start"));
|
||||
S.TieTextBox(wxT(""), frequency[1], 10)->SetName(_("Frequency Hertz End"));
|
||||
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 10)->SetName(_("Amplitude Start"));
|
||||
S.TieTextBox(wxT(""), amplitude[1], 10)->SetName(_("Amplitude End"));
|
||||
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 10)->SetName(_("Frequency Hertz Start"));
|
||||
S.TieNumericTextBox(wxT(""), frequency[1], 10)->SetName(_("Frequency Hertz End"));
|
||||
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 10)->SetName(_("Amplitude Start"));
|
||||
S.TieNumericTextBox(wxT(""), amplitude[1], 10)->SetName(_("Amplitude End"));
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
S.StartMultiColumn(2, wxCENTER);
|
||||
|
@@ -878,15 +878,15 @@ void TruncSilenceDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
wxArrayString choices(Enums::NumDbChoices, Enums::GetDbChoices());
|
||||
|
||||
S.Id( ID_SHORTEST_SILENCE_TEXT ).TieTextBox(_("Min silence duration:"),
|
||||
S.Id( ID_SHORTEST_SILENCE_TEXT ).TieNumericTextBox(_("Min silence duration:"),
|
||||
mEffect->mTruncInitialAllowedSilentMs,
|
||||
10);
|
||||
S.AddUnits( _("milliseconds") );
|
||||
S.Id( ID_LONGEST_SILENCE_TEXT ).TieTextBox(_("Max silence duration:"),
|
||||
S.Id( ID_LONGEST_SILENCE_TEXT ).TieNumericTextBox(_("Max silence duration:"),
|
||||
mEffect->mTruncLongestAllowedSilentMs,
|
||||
10);
|
||||
S.AddUnits( _("milliseconds") );
|
||||
S.Id( ID_COMPRESS_FACTOR ).TieTextBox(_("Silence compression:"),
|
||||
S.Id( ID_COMPRESS_FACTOR ).TieNumericTextBox(_("Silence compression:"),
|
||||
mEffect->mSilenceCompressRatio,
|
||||
10);
|
||||
S.AddUnits( _(":1") );
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/valtext.h>
|
||||
|
||||
//
|
||||
// EffectWahwah
|
||||
@@ -208,6 +209,7 @@ WahwahDialog::WahwahDialog(EffectWahwah * effect, wxWindow * parent)
|
||||
|
||||
void WahwahDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
wxTextValidator vld(wxFILTER_NUMERIC);
|
||||
S.SetBorder(10);
|
||||
S.StartHorizontalLay(wxCENTER, false);
|
||||
{
|
||||
@@ -219,16 +221,19 @@ void WahwahDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartMultiColumn(3, wxCENTER);
|
||||
{
|
||||
wxSlider *s;
|
||||
S.Id(ID_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
|
||||
wxTextCtrl * tempTC;
|
||||
tempTC = S.Id(ID_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_FREQSLIDER).AddSlider(wxT(""), 100, FREQ_MAX, FREQ_MIN);
|
||||
s->SetName(_("LFO frequency in hertz"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_PHASESLIDER).AddSlider(wxT(""), 0, PHASE_MAX, PHASE_MIN);
|
||||
s->SetName(_("LFO start phase in degrees"));
|
||||
s->SetLineSize(10);
|
||||
@@ -236,24 +241,27 @@ void WahwahDialog::PopulateOrExchange(ShuttleGui & S)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_DEPTHTEXT).AddTextBox(_("Depth (%):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_DEPTHTEXT).AddTextBox(_("Depth (%):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_DEPTHSLIDER).AddSlider(wxT(""), 0, DEPTH_MAX, DEPTH_MIN);
|
||||
s->SetName(_("Depth in percent"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_RESONANCETEXT).AddTextBox(_("Resonance:"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_RESONANCETEXT).AddTextBox(_("Resonance:"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s = S.Id(ID_RESONANCESLIDER).AddSlider(wxT(""), 0, RES_MAX, RES_MIN);
|
||||
s->SetName(_("Resonance"));
|
||||
#if defined(__WXGTK__)
|
||||
s->SetMinSize(wxSize(100, -1));
|
||||
#endif
|
||||
|
||||
S.Id(ID_FREQOFFTEXT).AddTextBox(_("Wah Frequency Offset (%):"), wxT(""), 12);
|
||||
tempTC = S.Id(ID_FREQOFFTEXT).AddTextBox(_("Wah Frequency Offset (%):"), wxT(""), 12);
|
||||
S.SetStyle(wxSL_HORIZONTAL);
|
||||
tempTC->SetValidator(vld);
|
||||
s =S.Id(ID_FREQOFFSLIDER).AddSlider(wxT(""), 0, FREQOFF_MAX, FREQOFF_MIN);
|
||||
s->SetName(_("Wah frequency offset in percent"));
|
||||
#if defined(__WXGTK__)
|
||||
|
@@ -1128,6 +1128,8 @@ NyquistDialog::NyquistDialog(wxWindow * parent, wxWindowID id,
|
||||
item = new wxTextCtrl(this, ID_NYQ_TEXT+i, wxT(""),
|
||||
wxDefaultPosition, wxSize(60, -1));
|
||||
item->SetName(ctrl->name);
|
||||
wxTextValidator vld(wxFILTER_NUMERIC);
|
||||
item->SetValidator(vld);
|
||||
|
||||
grid->Add(item, 0, wxALIGN_CENTRE | wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
|
||||
|
@@ -108,10 +108,10 @@ void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
|
||||
S.StartTwoColumn();
|
||||
{
|
||||
S.TieTextBox(_("Mi&nimum Free Memory (MB):"),
|
||||
wxT("/Directories/CacheLowMem"),
|
||||
16,
|
||||
9);
|
||||
S.TieNumericTextBox(_("Mi&nimum Free Memory (MB):"),
|
||||
wxT("/Directories/CacheLowMem"),
|
||||
16,
|
||||
9);
|
||||
}
|
||||
S.EndTwoColumn();
|
||||
|
||||
|
@@ -142,9 +142,9 @@ void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) {
|
||||
&empty);
|
||||
int latency = gPrefs->Read(wxT("/MidiIO/OutputLatency"),
|
||||
DEFAULT_SYNTH_LATENCY);
|
||||
mLatency = S.TieTextBox(_("MIDI Synthesizer Latency (ms):"),
|
||||
wxT("/MidiIO/SynthLatency"),
|
||||
latency, 3);
|
||||
mLatency = S.TieNumericTextBox(_("MIDI Synthesizer Latency (ms):"),
|
||||
wxT("/MidiIO/SynthLatency"),
|
||||
latency, 3);
|
||||
}
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
|
@@ -58,10 +58,10 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.StartThreeColumn();
|
||||
{
|
||||
w = S.TieTextBox(_("&Length of preview:"),
|
||||
wxT("/AudioIO/EffectsPreviewLen"),
|
||||
3.0,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("&Length of preview:"),
|
||||
wxT("/AudioIO/EffectsPreviewLen"),
|
||||
3.0,
|
||||
9);
|
||||
S.AddUnits(_("seconds"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("seconds"));
|
||||
}
|
||||
@@ -73,17 +73,17 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.StartThreeColumn();
|
||||
{
|
||||
w = S.TieTextBox(_("Preview &before cut region:"),
|
||||
wxT("/AudioIO/CutPreviewBeforeLen"),
|
||||
1.0,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("Preview &before cut region:"),
|
||||
wxT("/AudioIO/CutPreviewBeforeLen"),
|
||||
1.0,
|
||||
9);
|
||||
S.AddUnits(_("seconds"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("seconds"));
|
||||
|
||||
w = S.TieTextBox(_("Preview &after cut region:"),
|
||||
wxT("/AudioIO/CutPreviewAfterLen"),
|
||||
1.0,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("Preview &after cut region:"),
|
||||
wxT("/AudioIO/CutPreviewAfterLen"),
|
||||
1.0,
|
||||
9);
|
||||
S.AddUnits(_("seconds"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("seconds"));
|
||||
}
|
||||
@@ -95,17 +95,17 @@ void PlaybackPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
S.StartThreeColumn();
|
||||
{
|
||||
w = S.TieTextBox(_("&Short period:"),
|
||||
wxT("/AudioIO/SeekShortPeriod"),
|
||||
1.0,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("&Short period:"),
|
||||
wxT("/AudioIO/SeekShortPeriod"),
|
||||
1.0,
|
||||
9);
|
||||
S.AddUnits(_("seconds"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("seconds"));
|
||||
|
||||
w = S.TieTextBox(_("Lo&ng period:"),
|
||||
wxT("/AudioIO/SeekLongPeriod"),
|
||||
15.0,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("Lo&ng period:"),
|
||||
wxT("/AudioIO/SeekLongPeriod"),
|
||||
15.0,
|
||||
9);
|
||||
S.AddUnits(_("seconds"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("seconds"));
|
||||
}
|
||||
|
@@ -145,9 +145,9 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.SetSizeHints(mSampleRateNames);
|
||||
|
||||
// Now do the edit box...
|
||||
mOtherSampleRate = S.TieTextBox(wxT(""),
|
||||
mOtherSampleRateValue,
|
||||
15);
|
||||
mOtherSampleRate = S.TieNumericTextBox(wxT(""),
|
||||
mOtherSampleRateValue,
|
||||
15);
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
|
||||
|
@@ -85,17 +85,17 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
{
|
||||
// only show the following controls if we use Portaudio v19, because
|
||||
// for Portaudio v18 we always use default buffer sizes
|
||||
w = S.TieTextBox(_("Audio to &buffer:"),
|
||||
wxT("/AudioIO/LatencyDuration"),
|
||||
DEFAULT_LATENCY_DURATION,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("Audio to &buffer:"),
|
||||
wxT("/AudioIO/LatencyDuration"),
|
||||
DEFAULT_LATENCY_DURATION,
|
||||
9);
|
||||
S.AddUnits(_("milliseconds (higher = more latency)"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("milliseconds (higher = more latency)"));
|
||||
|
||||
w = S.TieTextBox(_("L&atency correction:"),
|
||||
wxT("/AudioIO/LatencyCorrection"),
|
||||
DEFAULT_LATENCY_CORRECTION,
|
||||
9);
|
||||
w = S.TieNumericTextBox(_("L&atency correction:"),
|
||||
wxT("/AudioIO/LatencyCorrection"),
|
||||
DEFAULT_LATENCY_CORRECTION,
|
||||
9);
|
||||
S.AddUnits(_("milliseconds (negative = backwards)"));
|
||||
w->SetName(w->GetName() + wxT(" ") + _("milliseconds (negative = backwards)"));
|
||||
}
|
||||
@@ -151,16 +151,16 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
|
||||
S.StartThreeColumn();
|
||||
{
|
||||
S.TieTextBox(_("Analysis Time:"),
|
||||
wxT("/AudioIO/AnalysisTime"),
|
||||
AILA_DEF_ANALYSIS_TIME,
|
||||
9);
|
||||
S.TieNumericTextBox(_("Analysis Time:"),
|
||||
wxT("/AudioIO/AnalysisTime"),
|
||||
AILA_DEF_ANALYSIS_TIME,
|
||||
9);
|
||||
S.AddUnits(_("milliseconds (time of one analysis)"));
|
||||
|
||||
S.TieTextBox(_("Number of consecutive analysis:"),
|
||||
wxT("/AudioIO/NumberAnalysis"),
|
||||
AILA_DEF_NUMBER_ANALYSIS,
|
||||
2);
|
||||
S.TieNumericTextBox(_("Number of consecutive analysis:"),
|
||||
wxT("/AudioIO/NumberAnalysis"),
|
||||
AILA_DEF_NUMBER_ANALYSIS,
|
||||
2);
|
||||
S.AddUnits(_("0 means endless"));
|
||||
}
|
||||
S.EndThreeColumn();
|
||||
|
@@ -127,34 +127,34 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartTwoColumn();
|
||||
{
|
||||
mMinFreq =
|
||||
S.TieTextBox(_("Mi&nimum Frequency (Hz):"),
|
||||
wxT("/Spectrum/MinFreq"),
|
||||
0,
|
||||
12);
|
||||
S.TieNumericTextBox(_("Mi&nimum Frequency (Hz):"),
|
||||
wxT("/Spectrum/MinFreq"),
|
||||
0,
|
||||
12);
|
||||
|
||||
mMaxFreq =
|
||||
S.TieTextBox(_("Ma&ximum Frequency (Hz):"),
|
||||
wxT("/Spectrum/MaxFreq"),
|
||||
8000,
|
||||
12);
|
||||
S.TieNumericTextBox(_("Ma&ximum Frequency (Hz):"),
|
||||
wxT("/Spectrum/MaxFreq"),
|
||||
8000,
|
||||
12);
|
||||
|
||||
mGain =
|
||||
S.TieTextBox(_("&Gain (dB):"),
|
||||
wxT("/Spectrum/Gain"),
|
||||
20,
|
||||
8);
|
||||
S.TieNumericTextBox(_("&Gain (dB):"),
|
||||
wxT("/Spectrum/Gain"),
|
||||
20,
|
||||
8);
|
||||
|
||||
mRange =
|
||||
S.TieTextBox(_("&Range (dB):"),
|
||||
wxT("/Spectrum/Range"),
|
||||
80,
|
||||
8);
|
||||
S.TieNumericTextBox(_("&Range (dB):"),
|
||||
wxT("/Spectrum/Range"),
|
||||
80,
|
||||
8);
|
||||
|
||||
mFrequencyGain =
|
||||
S.TieTextBox(_("Frequency g&ain (dB/dec):"),
|
||||
wxT("/Spectrum/FrequencyGain"),
|
||||
0,
|
||||
4);
|
||||
S.TieNumericTextBox(_("Frequency g&ain (dB/dec):"),
|
||||
wxT("/Spectrum/FrequencyGain"),
|
||||
0,
|
||||
4);
|
||||
}
|
||||
S.EndTwoColumn();
|
||||
|
||||
@@ -176,16 +176,16 @@ void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartTwoColumn();
|
||||
{
|
||||
mFindNotesMinA =
|
||||
S.TieTextBox(_("Minimum Amplitude (dB):"),
|
||||
wxT("/Spectrum/FindNotesMinA"),
|
||||
-30L,
|
||||
8);
|
||||
S.TieNumericTextBox(_("Minimum Amplitude (dB):"),
|
||||
wxT("/Spectrum/FindNotesMinA"),
|
||||
-30L,
|
||||
8);
|
||||
|
||||
mFindNotesN =
|
||||
S.TieTextBox(_("Max. Number of Notes (1..128):"),
|
||||
wxT("/Spectrum/FindNotesN"),
|
||||
5L,
|
||||
8);
|
||||
S.TieNumericTextBox(_("Max. Number of Notes (1..128):"),
|
||||
wxT("/Spectrum/FindNotesN"),
|
||||
5L,
|
||||
8);
|
||||
}
|
||||
S.EndTwoColumn();
|
||||
|
||||
|
Reference in New Issue
Block a user