m_panel1->Layout();
bSizer4->Fit(m_panel1);
mainSizer->Add(m_panel1, 1, wxEXPAND | wxALL, 1);
+
wxBoxSizer* bSizer6;
bSizer6 = new wxBoxSizer(wxHORIZONTAL);
m_btnRefresh = new wxButton(this, wxID_ANY, _("Refresh"), wxDefaultPosition, wxDefaultSize, 0);
bSizer6->Add(m_btnRefresh, 0, wxALIGN_CENTER|wxALL, 2);
+
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton(this, wxID_OK);
m_sdbSizer1->AddButton(m_sdbSizer1OK);
m_sdbSizer1Cancel = new wxButton(this, wxID_CANCEL);
m_sdbSizer1->AddButton(m_sdbSizer1Cancel);
m_sdbSizer1->Realize();
+
bSizer6->Add(m_sdbSizer1, 1, wxALIGN_CENTER_VERTICAL, 2);
mainSizer->Add(bSizer6, 0, wxEXPAND, 2);
this->SetSizer(mainSizer);
wxStaticBoxSizer* lpcpfs = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("LPC Post Filter")), wxHORIZONTAL);
-#define GRID
+ //#define GRID
#ifdef GRID
wxGridSizer* gs = new wxGridSizer(2,2,0,0);
lpcpfs->Add(gs, 0, wxALL, 0);
#else
- wxBoxSizer* left = new wxBoxSizer(wxVERTICAL);
+ wxBoxSizer* left = new wxBoxSizer(wxVERTICAL);
m_codec2LPCPostFilterEnable = new wxCheckBox(this, wxID_ANY, _("Enable"), wxDefaultPosition,wxDefaultSize, wxCHK_2STATE);
left->Add(m_codec2LPCPostFilterEnable);
newLPCPFControl(&m_codec2LPCPostFilterBeta, &m_staticTextBeta, right, "Beta");
newLPCPFControl(&m_codec2LPCPostFilterGamma, &m_staticTextGamma, right, "Gamma");
- lpcpfs->Add(right, 0, wxALL, 5);
+ lpcpfs->Add(right, 0, wxALL|wxBOTTOM, 5);
#endif
bSizer30->Add(lpcpfs, 0, wxALL, 0);
m_SpkOutFreqRespPlot = new PlotSpectrum((wxFrame*)m_auiNotebook, m_SpkOutMagdB, F_MAG_N, FILTER_MIN_MAG_DB, FILTER_MAX_MAG_DB);
m_auiNotebook->AddPage(m_SpkOutFreqRespPlot, _("Speaker Out Equaliser"));
- // OK - Cancel - Default Buttons at the bottom --------------------------
+ // Default - Cancel - OK Buttons at the bottom --------------------------
wxBoxSizer* bSizer31 = new wxBoxSizer(wxHORIZONTAL);
- m_sdbSizer5OK = new wxButton(this, wxID_OK);
- bSizer31->Add(m_sdbSizer5OK, 0, wxALL, 2);
m_sdbSizer5Default = new wxButton(this, wxID_ANY, wxT("Default"));
bSizer31->Add(m_sdbSizer5Default, 0, wxALL, 2);
+
m_sdbSizer5Cancel = new wxButton(this, wxID_CANCEL);
bSizer31->Add(m_sdbSizer5Cancel, 0, wxALL, 2);
+ m_sdbSizer5OK = new wxButton(this, wxID_OK);
+ bSizer31->Add(m_sdbSizer5OK, 0, wxALL, 2);
bSizer30->Add(bSizer31, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
m_MicInMid.freqHz = 1500.0;
m_MicInMid.gaindB = 0.0;
- setFreq(&m_MicInMid); setGain(&m_MicInMid);
+ m_MicInMid.Q = 1.0;
+ setFreq(&m_MicInMid); setGain(&m_MicInMid); setQ(&m_MicInMid);
plotMicInFilterSpectrum();
}
void FilterDlg::setGain(EQ *eq)
{
wxString buf;
- buf.Printf(wxT("%3.0f"), eq->gaindB);
+ buf.Printf(wxT("%3.1f"), eq->gaindB);
eq->valueGain->SetLabel(buf);
int slider = (int)(((eq->gaindB-MIN_GAIN)/(MAX_GAIN-MIN_GAIN))*SLIDER_MAX + 0.5);
eq->sliderGain->SetValue(slider);
void FilterDlg::setQ(EQ *eq)
{
wxString buf;
- buf.Printf(wxT("%3.0f"), eq->Q);
+ buf.Printf(wxT("%2.1f"), eq->Q);
eq->valueQ->SetLabel(buf);
float log10_range = MAX_LOG10_Q - MIN_LOG10_Q;
// doing this from basic principles rather than FFT for no good reason
for(f=0,i=0; f<MAX_F_HZ; f+=F_STEP_DFT,i++) {
- w = M_PI*f/MAX_F_HZ;
+ w = M_PI*f/(FS/2);
X[i].real = 0.0; X[i].imag = 0.0;
for(k=0; k<NIMP; k++) {
X[i].real += ((float)out[k]/IMP_AMP) * cos(w*k);