[ ] FreeDV 700 mode
[ ] integrate freedv API
- [ ] varicode, codec, modem states
- [ ] tx and rx freq shifts
- [ ] generic, mode indep, sync and snr?
+ [X] varicode, codec, modem states
+ [X] tx and rx freq shifts
+ [ ] generic, mode indep, sync, snr, scatter?
[ ] add 700 to freedv API
[ ] modem signal spectrum and stats consistent with fdmdv
+ [ ] clipper a check box, so we can see difference in spectrum
[ ] how to handle Fs=7500 Hz?
[ ] freedv api
[ ] normalise output pwr across modes?
+ + or maybe peak output?
+ + option?
[X] support for both varicodes
[ ] test mode
+ get error patterns working again, both modes
+ how to plot error histogram
[ ] Small fixes
- [ ] win32 X-compile
[X] Playfile bug
[X] running again
[X] bump ver number
[X] long varicode default
[X] option to _not_ require checksum, on by default
+ [X] default squelch 2dB
+ [ ] win32 X-compile
+ [ ] cmd line file decode
[ ] Waterfall direction
[ ] test mode on 1600 with freedv api
+ maybe calc stats, hist
#define MAX_FPB 8096 // maximum value of portAudio framesPerBuffer
#define PA_FPB 1024 // nominal value of portAudio framesPerBuffer
#define SAMPLE_RATE 48000 // 48 kHz sampling rate rec. as we can trust accuracy of sound card
-#define N8 FREEDV_NSAMPLES // processing buffer size at 8 kHz
+#define N8 160 // processing buffer size at 8 kHz
#define MEM8 (FDMDV_OS_TAPS/FDMDV_OS)
#define N48 (N8*SAMPLE_RATE/FS) // processing buffer size at 48 kHz
#define NUM_CHANNELS 2 // I think most sound cards prefer stereo we will convert to mono
#define MAX_BITS_PER_FDMDV_FRAME 40 // 2000 bit/s mode
// Squelch
-#define SQ_DEFAULT_SNR 1.5
+#define SQ_DEFAULT_SNR 2.0
// Level Gauge
#define FROM_RADIO_MAX 0.8
struct FIFO *g_rxDataOutFifo;
// tx/rx processing states
-int g_nRxIn = FREEDV_NSAMPLES;
int g_State;
paCallBackData *g_rxUserdata;
m_btnTogPTT->Enable();
m_rb1600->Disable();
+ m_rb700->Disable();
#ifdef DISABLED_FEATURE
m_rb1600Wide->Disable();
m_rb1400old->Disable();
m_btnTogPTT->Disable();
m_togBtnOnOff->SetLabel(wxT("Start"));
m_rb1600->Enable();
+ m_rb700->Enable();
#ifdef DISABLED_FEATURE
m_rb1400old->Enable();
m_rb1600Wide->Enable();
g_rxUserdata->outfifo2 = fifo_create(8*N48);
g_rxUserdata->infifo2 = fifo_create(8*N48);
- g_rxUserdata->rxinfifo = fifo_create(3 * FREEDV_NSAMPLES);
+ g_rxUserdata->rxinfifo = fifo_create(3 * g_pfreedv->n_speech_samples);
g_rxUserdata->rxoutfifo = fifo_create(2 * codec2_samples_per_frame(g_pfreedv->codec2));
// Init Equaliser Filters ------------------------------------------------------
out8k_short[i] = out;
}
}
- else
- freedv_tx(g_pfreedv, out8k_short, in8k_short);
+ else {
+ COMP tx_fdm[g_pfreedv->n_nom_modem_samples];
+ COMP tx_fdm_offset[g_pfreedv->n_nom_modem_samples];
+ int i;
+
+ freedv_comptx(g_pfreedv, tx_fdm, in8k_short);
+ fdmdv_freq_shift(tx_fdm_offset, tx_fdm, g_TxFreqOffsetHz, &g_TxFreqOffsetPhaseRect, g_pfreedv->n_nom_modem_samples);
+ for(i=0; i<g_pfreedv->n_nom_modem_samples; i++)
+ out8k_short[i] = tx_fdm_offset[i].real;
+ }
- // output 40ms of modem tone
- nout = resample(cbData->outsrc1, out48k_short, out8k_short, g_soundCard1SampleRate, FS, N48, N8);
+ // output one frame of modem signal
+ nout = resample(cbData->outsrc1, out48k_short, out8k_short, g_soundCard1SampleRate, g_pfreedv->modem_sample_rate, N48, g_pfreedv->n_nom_modem_samples);
g_mutexProtectingCallbackData.Lock();
fifo_write(cbData->outfifo1, out48k_short, nout);
}
FIFO *input_fifo
)
{
- short input_buf[FREEDV_NSAMPLES];
+ short input_buf[g_pfreedv->n_max_modem_samples];
short output_buf[N8];
- COMP rx_fdm[2*FREEDV_NSAMPLES];
- COMP rx_fdm_offset[2*FREEDV_NSAMPLES];
+ COMP rx_fdm[g_pfreedv->n_max_modem_samples];
+ COMP rx_fdm_offset[g_pfreedv->n_max_modem_samples];
float rx_spec[FDMDV_NSPEC];
int i;
- int nin, nin_prev;
+ int nin, nin_prev, nout;
nin = freedv_nin(g_pfreedv);
while (fifo_read(input_fifo, input_buf, nin) == 0)
{
- assert(nin <= 2*FREEDV_NSAMPLES);
+ assert(nin <= g_pfreedv->n_max_modem_samples);
nin_prev = nin;
fdmdv_simulate_channel(g_pfreedv->fdmdv, rx_fdm, nin, 2.0);
}
fdmdv_freq_shift(rx_fdm_offset, rx_fdm, g_RxFreqOffsetHz, &g_RxFreqOffsetPhaseRect, nin);
- freedv_comprx(g_pfreedv, output_buf, rx_fdm_offset);
+ nout = freedv_comprx(g_pfreedv, output_buf, rx_fdm_offset);
+ fifo_write(output_fifo, output_buf, nout);
+
nin = freedv_nin(g_pfreedv);
g_State = g_pfreedv->fdmdv_stats.sync;
g_snr = g_pfreedv->fdmdv_stats.snr_est;
wxStaticBoxSizer* sbSizer_mode;
sbSizer_mode = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Mode")), wxVERTICAL);
+#ifdef DISABLED_FEATURE
m_rb1400old = new wxRadioButton( this, wxID_ANY, wxT("1400 V0.91"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
sbSizer_mode->Add(m_rb1400old, 0, wxALIGN_LEFT|wxALL, 1);
-#ifdef DISABLED_FEATURE
m_rb1400 = new wxRadioButton( this, wxID_ANY, wxT("1400"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb1400, 0, wxALIGN_LEFT|wxALL, 1);
#endif
+ m_rb700 = new wxRadioButton( this, wxID_ANY, wxT("700"), wxDefaultPosition, wxDefaultSize, 0);
+ sbSizer_mode->Add(m_rb700, 0, wxALIGN_LEFT|wxALL, 1);
m_rb1600 = new wxRadioButton( this, wxID_ANY, wxT("1600"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb1600, 0, wxALIGN_LEFT|wxALL, 1);
m_rb1600->SetValue(true);
+#ifdef DISABLED_FEATURE
m_rb1600Wide = new wxRadioButton( this, wxID_ANY, wxT("1600 Wide"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb1600Wide, 0, wxALIGN_LEFT|wxALL, 1);
-#ifdef DISABLED_FEATURE
m_rb2000 = new wxRadioButton( this, wxID_ANY, wxT("2000"), wxDefaultPosition, wxDefaultSize, 0);
sbSizer_mode->Add(m_rb2000, 0, wxALIGN_LEFT|wxALL, 1);
#endif
wxRadioButton *m_rbSync;
wxRadioButton *m_rb1400old;
wxRadioButton *m_rb1400;
+ wxRadioButton *m_rb700;
wxRadioButton *m_rb1600;
wxRadioButton *m_rb2000;
wxRadioButton *m_rb1600Wide;