aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnetz/fsk_fm_demod.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-01-06 14:13:14 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-01-07 06:26:50 +0100
commit2d0bc92cdef930876d68c46448d84d3c4165129c (patch)
treee972cb71d2274e90f6d45318e623fc0df1502fc8 /src/cnetz/fsk_fm_demod.h
parenta37dfe38aba937b3a1367d73e028057b3f4775c8 (diff)
C-Netz: Make demodulation buffer size dynamic
Diffstat (limited to 'src/cnetz/fsk_fm_demod.h')
-rw-r--r--src/cnetz/fsk_fm_demod.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cnetz/fsk_fm_demod.h b/src/cnetz/fsk_fm_demod.h
index b1889bd..8f4ce08 100644
--- a/src/cnetz/fsk_fm_demod.h
+++ b/src/cnetz/fsk_fm_demod.h
@@ -20,7 +20,7 @@ typedef struct fsk_fm_demod {
double bit_time_uncorrected; /* same as above, but not corrected by sync */
/* bit detection */
- int16_t bit_buffer_spl[40]; /* samples ring buffer */
+ int16_t *bit_buffer_spl; /* samples ring buffer */
int bit_buffer_len; /* number of samples in ring buffer */
int bit_buffer_half; /* half of ring buffer */
int bit_buffer_pos; /* current position to write next sample */
@@ -35,7 +35,7 @@ typedef struct fsk_fm_demod {
double sync_jitter; /* what was the jitter of the sync */
/* speech */
- int16_t speech_buffer[3000]; /* holds one chunk of 12.5ms */
+ int16_t *speech_buffer; /* holds one chunk of 12.5ms */
int speech_size;
int speech_count;
@@ -51,6 +51,7 @@ typedef struct fsk_fm_demod {
} fsk_fm_demod_t;
int fsk_fm_init(fsk_fm_demod_t *fsk, cnetz_t *cnetz, int samplerate, double bitrate);
+void fsk_fm_exit(fsk_fm_demod_t *fsk);
void fsk_fm_demod(fsk_fm_demod_t *fsk, int16_t *samples, int length);
void fsk_correct_sync(fsk_fm_demod_t *fsk, double offset);
void fsk_copy_sync(fsk_fm_demod_t *fsk_to, fsk_fm_demod_t *fsk_from);