parent
17b34fbae6
commit
fd3a4d7ac2
@ -1,3 +1,3 @@ |
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = libgermanton libtimer libsamplerate libscrambler libfilter common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
|
||||
SUBDIRS = libdtmf libgermanton libtimer libsamplerate libscrambler libfilter common anetz bnetz cnetz nmt amps tacs jtacs r2000 tv test
|
||||
|
||||
|
@ -0,0 +1,6 @@ |
||||
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
|
||||
|
||||
noinst_LIBRARIES = libdtmf.a
|
||||
|
||||
libdtmf_a_SOURCES = \
|
||||
dtmf_encode.c
|
@ -1,14 +1,14 @@ |
||||
|
||||
typedef struct dtmf { |
||||
typedef struct dtmf_enc { |
||||
int samplerate; /* samplerate */ |
||||
char tone; /* current tone to be played */ |
||||
int pos; /* sample counter for tone */ |
||||
int max; /* max number of samples for tone duration */ |
||||
double phaseshift65536[2]; /* how much the phase of sine wave changes per sample */ |
||||
double phase65536[2]; /* current phase */ |
||||
} dtmf_t; |
||||
} dtmf_enc_t; |
||||
|
||||
void dtmf_init(dtmf_t *dtmf, int samplerate); |
||||
void dtmf_set_tone(dtmf_t *dtmf, char tone); |
||||
void dtmf_tone(dtmf_t *dtmf, sample_t *samples, int length); |
||||
void dtmf_encode_init(dtmf_enc_t *dtmf, int samplerate, double dBm_level); |
||||
void dtmf_encode_set_tone(dtmf_enc_t *dtmf, char tone); |
||||
void dtmf_encode(dtmf_enc_t *dtmf, sample_t *samples, int length); |
||||
|
Loading…
Reference in new issue