1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Fix DtmfGen base on Peter's feedback

This commit is contained in:
Leland Lucius
2015-04-23 02:02:34 -05:00
parent d95cb872a4
commit 0f8e0ffeb6
2 changed files with 61 additions and 32 deletions

View File

@@ -66,8 +66,10 @@ private:
void UpdateUI();
void OnText(wxCommandEvent & evt);
void OnSlider(wxCommandEvent & evt);
void OnSequence(wxCommandEvent & evt);
void OnAmplitude(wxCommandEvent & evt);
void OnDuration(wxCommandEvent & evt);
void OnDutyCycle(wxCommandEvent & evt);
private:
sampleCount numSamplesSequence; // total number of samples to generate
@@ -79,14 +81,16 @@ private:
bool isTone; // true if block is tone, otherwise silence
int curSeqPos; // index into dtmf tone string
wxString dtmfString; // dtmf tone string
wxString dtmfSequence; // dtmf tone string
int dtmfNTones; // total number of tones to generate
double dtmfTone; // duration of a single tone in ms
double dtmfSilence; // duration of silence between tones in ms
double dtmfDutyCycle; // ratio of dtmfTone/(dtmfTone+dtmfSilence)
double dtmfAmplitude; // amplitude of dtmf tone sequence, restricted to (0-1)
wxSlider *mDtmfDutyS;
wxTextCtrl *mDtmfSequenceT;
wxTextCtrl *mDtmfAmplitudeT;
wxSlider *mDtmfDutyCycleS;
NumericTextCtrl *mDtmfDurationT;
wxStaticText *mDtmfToneT;
wxStaticText *mDtmfSilenceT;