DTMF: Now allows to give duration and pause for digit

Also the dtmf encoder will return less samples, if the digit(+pause)
ends, so that the caller call set the next digit to play seamlessly.

A reset function allows to clear the decoder states, to prevent glitches
when re-attaching to an interrupted stream.
This commit is contained in:
Andreas Eversberg
2022-09-29 20:02:50 +02:00
parent a756ba8fd9
commit b60c844b4f
9 changed files with 74 additions and 44 deletions

View File

@@ -1,3 +1,6 @@
#ifndef _LIB_FSK_H
#define _LIB_FSK_H
#include "../libfm/fm.h"
typedef struct fsk_mod {
@@ -41,3 +44,4 @@ int fsk_demod_init(fsk_demod_t *fsk, void *inst, void (*receive_bit)(void *inst,
void fsk_demod_cleanup(fsk_demod_t *fsk);
void fsk_demod_receive(fsk_demod_t *fsk, sample_t *sample, int length);
#endif /* _LIB_FSK_H */