Go to the source code of this file.
Classes | |
struct | tone_gen_descriptor_t |
struct | tone_gen_state_t |
struct | dtmf_tx_state_t |
struct | cadenced_tone_t |
Defines | |
#define | _TONE_GENERATE_H_ |
#define | MAX_DTMF_DIGITS 128 |
Enumerations | |
enum | mf_tone_types_e { BELL_MF_TONES, R2_MF_TONES, SOCOTEL_TONES } |
Functions | |
void | make_tone_descriptor (tone_gen_descriptor_t *desc, cadenced_tone_t *tone) |
void | make_tone_gen_descriptor (tone_gen_descriptor_t *s, int f1, int l1, int f2, int l2, int d1, int d2, int d3, int d4, int repeat) |
void | tone_gen_init (tone_gen_state_t *s, tone_gen_descriptor_t *t) |
int | tone_gen (tone_gen_state_t *s, int16_t amp[], int max_samples) |
void | dtmf_gen_init (void) |
Initialise DTMF tone generation. This should be called before any other use of the DTMF tone features. | |
dtmf_tx_state_t * | dtmf_tx_init (dtmf_tx_state_t *s) |
Initialise a DTMF tone generator context. | |
int | dtmf_tx (dtmf_tx_state_t *s, int16_t amp[], int max_samples) |
Generate a buffer of DTMF tones. | |
int | dtmf_put (dtmf_tx_state_t *s, const char *digits) |
Put a string of digits in a DTMF generator's input buffer. | |
void | bell_mf_gen_init (void) |
Initialise Bell MF tone generation. This should be called before any other use of the Bell MF tone features. | |
dtmf_tx_state_t * | bell_mf_tx_init (dtmf_tx_state_t *s) |
Initialise a Bell MF generator context. | |
void | r2_mf_tx_init (void) |
Initialise MFC/R2 tone generation. This should be called before any other use of the MFC/R2 tone features. | |
int | r2_mf_tx (tone_gen_state_t *s, int16_t amp[], int samples, int fwd, char digit) |
Generate a block of R2 MF tones. |
dtmf_tx_state_t* bell_mf_tx_init | ( | dtmf_tx_state_t * | s | ) |
Initialise a Bell MF generator context.
s | The Bell MF generator context (same type as a DTMF context). |
int dtmf_put | ( | dtmf_tx_state_t * | s, | |
const char * | digits | |||
) |
Put a string of digits in a DTMF generator's input buffer.
s | The DTMF generator context. | |
digits | The string of digits to be added. |
int dtmf_tx | ( | dtmf_tx_state_t * | s, | |
int16_t | amp[], | |||
int | max_samples | |||
) |
Generate a buffer of DTMF tones.
s | The DTMF generator context. | |
amp | The buffer for the generated signal. | |
max_samples | The required number of generated samples. |
dtmf_tx_state_t* dtmf_tx_init | ( | dtmf_tx_state_t * | s | ) |
Initialise a DTMF tone generator context.
s | The DTMF generator context. |
int r2_mf_tx | ( | tone_gen_state_t * | s, | |
int16_t | amp[], | |||
int | samples, | |||
int | fwd, | |||
char | digit | |||
) |
Generate a block of R2 MF tones.
s | The R2 MF generate context. | |
amp | The buffer for the generated signal. | |
samples | The required number of generated samples. | |
fwd | TRUE to use the forward tone set. FALSE to use the reverse tone set. | |
digit | The digit to be generated. When continuing to generate the same digit as during the last call to this function, digit should be set to 0x7F. |