m_ckboxChannelNoise = new wxCheckBox(this, wxID_ANY, _("Channel Noise SNR (dB):"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
sbSizer_testFrames->Add(m_ckboxChannelNoise, 0, wxALIGN_LEFT, 0);
- m_txtNoiseSNR = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), 0, wxTextValidator(wxFILTER_DIGITS));
+ m_txtNoiseSNR = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), 0, wxTextValidator(wxFILTER_NUMERIC));
sbSizer_testFrames->Add(m_txtNoiseSNR, 0, wxALIGN_LEFT, 0);
m_ckboxAttnCarrierEn = new wxCheckBox(this, wxID_ANY, _("Attn Carrier Carrier:"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
long noise_snr;
m_txtNoiseSNR->GetValue().ToLong(&noise_snr);
wxGetApp().m_noise_snr = (int)noise_snr;
-
+ //fprintf(stderr, "noise_snr: %d\n", (int)noise_snr);
+
wxGetApp().m_tone = m_ckboxTone->GetValue();
long tone_freq_hz, tone_amplitude;
m_txtToneFreqHz->GetValue().ToLong(&tone_freq_hz);
char snr[15];
sprintf(snr, "%d", (int)(g_snr+0.5)); // round to nearest dB
- //printf("snr_est: %f m_snrBeta: %f g_snr: %f snr_limited: %f\n", g_stats.snr_est, m_snrBeta, g_snr, snr_limited);
+ //fprintf(stderr, "snr_est: %f m_snrBeta: %f g_snr: %f snr_limited: %f\n", g_stats.snr_est, m_snrBeta, g_snr, snr_limited);
wxString snr_string(snr);
m_textSNR->SetLabel(snr_string);
if(inDevice != paNoDevice) {
pa->setInputChannelCount(inputChannels); // stereo input
pa->setInputSampleFormat(PA_SAMPLE_TYPE);
- pa->setInputLatency(pa->getInputDefaultLowLatency());
+ pa->setInputLatency(pa->getInputDefaultHighLatency());
fprintf(stderr,"PA in; low: %f high: %f\n", pa->getInputDefaultLowLatency(), pa->getInputDefaultHighLatency());
pa->setInputHostApiStreamInfo(NULL);
}
if(outDevice != paNoDevice) {
pa->setOutputChannelCount(2); // stereo output
pa->setOutputSampleFormat(PA_SAMPLE_TYPE);
- pa->setOutputLatency(pa->getOutputDefaultLowLatency());
+ pa->setOutputLatency(pa->getOutputDefaultHighLatency());
fprintf(stderr,"PA out; low: %f high: %f\n", pa->getOutputDefaultLowLatency(), pa->getOutputDefaultHighLatency());
pa->setOutputHostApiStreamInfo(NULL);
}