diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2022-09-29 20:02:50 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2022-10-23 16:56:36 +0200 |
commit | b60c844b4f0e528cb4ee1b58e4a9486362b02157 (patch) | |
tree | c3b05f71714180ec4a9b332c247db1e42ead31f8 /src/test | |
parent | a756ba8fd97cb2040d3dd86bab7c7e92e57bc16f (diff) |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_dtmf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_dtmf.c b/src/test/test_dtmf.c index 6640c59..f26ae3b 100644 --- a/src/test/test_dtmf.c +++ b/src/test/test_dtmf.c @@ -96,7 +96,7 @@ int main(void) for (i = 0; i < 16; i++) { printf("Testing digit '%c' encoding and decoding:\n", test_digits[i]); memset(samples, 0, sizeof(samples[0]) * SAMPLERATE); - dtmf_encode_set_tone(&dtmf_enc, test_digits[i]); + dtmf_encode_set_tone(&dtmf_enc, test_digits[i], 1.0, 0.0); dtmf_encode(&dtmf_enc, samples + SAMPLERATE / 10, SAMPLERATE / 20); got_digit = 0; dtmf_decode(&dtmf_dec, samples, SAMPLERATE); |