C-Netz: Swtitch speech scrambler only after receiving 3 consecutive frames with different scrambler mode

This commit is contained in:
Andreas Eversberg
2018-07-01 09:18:07 +02:00
parent 7c4cfd5567
commit 40aec4f14c
2 changed files with 12 additions and 2 deletions

View File

@@ -107,6 +107,7 @@ typedef struct cnetz {
double fsk_tx_phase; /* current bit position */
uint64_t fsk_tx_scount; /* sample counter (used to sync multiple channels) */
int scrambler; /* 0 = normal speech, 1 = scrambled speech */
int scrambler_switch; /* counter to switch after 3 frames with new scrabler state */
sample_t *dsp_speech_buffer; /* samples in one chunk */
int dsp_speech_length; /* number of samples */
int dsp_speech_pos; /* current position in buffer */