mirror of
https://github.com/n5ac/smartsdr-dsp.git
synced 2025-12-06 03:01:59 +01:00
Merge branch 'BBB-dsp' of https://github.com/n5ac/smartsdr-dsp into BBB-dsp
Merging Graham's debug changes with Ed's improvements.
This commit is contained in:
commit
4efa220580
|
|
@ -303,7 +303,7 @@ int freedv_rx(struct freedv *f, short speech_out[], short demod_in[]) {
|
|||
nin_prev = f->nin;
|
||||
fdmdv_demod(f->fdmdv, f->fdmdv_bits, &reliable_sync_bit, rx_fdm, &f->nin);
|
||||
fdmdv_get_demod_stats(f->fdmdv, &f->fdmdv_stats);
|
||||
|
||||
f->reliable_sync_bit = reliable_sync_bit;
|
||||
if (f->fdmdv_stats.sync) {
|
||||
// printf("\033[97mIn sync. Pass demod_in to Codec, Codec to speech_out\n");
|
||||
if (reliable_sync_bit == 0) {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ struct freedv {
|
|||
|
||||
void *callback_state;
|
||||
|
||||
int reliable_sync_bit;
|
||||
|
||||
};
|
||||
|
||||
struct freedv *freedv_open(int mode);
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ static void* _sched_waveform_thread(void* param)
|
|||
|
||||
int i; // for loop counter
|
||||
float fsample; // a float sample
|
||||
// float Sig2Noise; // Signal to noise ratio
|
||||
float Sig2Noise; // Signal to noise ratio
|
||||
|
||||
// Flags ...
|
||||
int initial_tx = 1; // Flags for TX circular buffer, clear if starting transmit
|
||||
|
|
@ -437,14 +437,19 @@ static void* _sched_waveform_thread(void* param)
|
|||
|
||||
nout = freedv_rx(_freedvS, speech_out, demod_in);
|
||||
|
||||
// if(nout != 320 ) {
|
||||
// output("NOUT not 320 it is %d\nNIN was %d\n", nout, nin);
|
||||
// }
|
||||
|
||||
|
||||
if ( nout == nin && _freedvS->reliable_sync_bit ){
|
||||
for( i=0 ; i < nout ; i++)
|
||||
{
|
||||
cbWriteShort(RX3_cb, speech_out[i]);
|
||||
}
|
||||
} else {
|
||||
|
||||
for ( i = 0; i < nin ; i ++ ) {
|
||||
cbWriteShort(RX3_cb, demod_in[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// } else {
|
||||
// break; /* Break out of while loop */
|
||||
|
|
@ -467,7 +472,7 @@ static void* _sched_waveform_thread(void* param)
|
|||
{
|
||||
cbWriteFloat(RX4_cb, float_out_24k[i]);
|
||||
}
|
||||
//Sig2Noise = (_freedvS->fdmdv_stats.snr_est);
|
||||
Sig2Noise = (_freedvS->fdmdv_stats.snr_est);
|
||||
}
|
||||
|
||||
// Check for >= 128 samples in RX4_cb. Form packet and
|
||||
|
|
|
|||
Loading…
Reference in a new issue