#include <stdlib.h>#include <stdio.h>#include <inttypes.h>#include "floating_fudge.h"#include <memory.h>#include <string.h>#include <limits.h>#include "spandsp/telephony.h"#include "spandsp/fast_convert.h"#include "spandsp/dc_restore.h"#include "spandsp/saturated.h"#include "spandsp/vector_int.h"#include "spandsp/complex.h"#include "spandsp/power_meter.h"#include "spandsp/dds.h"#include "spandsp/super_tone_rx.h"#include "spandsp/sig_tone.h"#include "spandsp/private/sig_tone.h"Defines | |
| #define | PI 3.14159265358979323 |
Enumerations | |
| enum | { NOTCH_COEFF_SET_2280HZ = 0, NOTCH_COEFF_SET_2400HZ, NOTCH_COEFF_SET_2600HZ } |
Functions | |
| int | sig_tone_tx (sig_tone_tx_state_t *s, int16_t amp[], int len) |
| Generate a block of signalling tone audio samples. | |
| void | sig_tone_tx_set_mode (sig_tone_tx_state_t *s, int mode, int duration) |
| Set the tone mode. | |
| sig_tone_tx_state_t * | sig_tone_tx_init (sig_tone_tx_state_t *s, int tone_type, tone_report_func_t sig_update, void *user_data) |
| Initialise a signalling tone context. | |
| int | sig_tone_tx_release (sig_tone_tx_state_t *s) |
| Release a signalling tone transmitter context. | |
| int | sig_tone_tx_free (sig_tone_tx_state_t *s) |
| Free a signalling tone transmitter context. | |
| int | sig_tone_rx (sig_tone_rx_state_t *s, int16_t amp[], int len) |
| Process a block of received audio samples. | |
| void | sig_tone_rx_set_mode (sig_tone_rx_state_t *s, int mode, int duration) |
| Set the receive mode. | |
| sig_tone_rx_state_t * | sig_tone_rx_init (sig_tone_rx_state_t *s, int tone_type, tone_report_func_t sig_update, void *user_data) |
| Initialise a signalling tone context. | |
| int | sig_tone_rx_release (sig_tone_rx_state_t *s) |
| Release a signalling tone receiver context. | |
| int | sig_tone_rx_free (sig_tone_rx_state_t *s) |
| Free a signalling tone receiver context. | |
Variables | |
| int | nnn = 0 |
| #define PI 3.14159265358979323 |
PI
| int sig_tone_rx | ( | sig_tone_rx_state_t * | s, | |
| int16_t | amp[], | |||
| int | len | |||
| ) |
Process a block of received audio samples.
Process a block of received audio samples.
| s | The signalling tone context. | |
| amp | The audio sample buffer. | |
| len | The number of samples in the buffer. |
| int sig_tone_rx_free | ( | sig_tone_rx_state_t * | s | ) |
Free a signalling tone receiver context.
Free a signalling tone receiver context.
| s | The signalling tone context. |
| sig_tone_rx_state_t* sig_tone_rx_init | ( | sig_tone_rx_state_t * | s, | |
| int | tone_type, | |||
| tone_report_func_t | sig_update, | |||
| void * | user_data | |||
| ) |
Initialise a signalling tone context.
Initialise a signalling tone receiver context.
| s | The signalling tone context. | |
| tone_type | The type of signalling tone. | |
| sig_update | Callback function to handle signalling updates. | |
| user_data | An opaque pointer. |
| int sig_tone_rx_release | ( | sig_tone_rx_state_t * | s | ) |
Release a signalling tone receiver context.
Release a signalling tone receiver context.
| s | The signalling tone context. |
| void sig_tone_rx_set_mode | ( | sig_tone_rx_state_t * | s, | |
| int | mode, | |||
| int | duration | |||
| ) |
Set the receive mode.
Set the receive mode.
| s | The signalling tone context. | |
| mode | The new mode for the receiver. | |
| duration | The duration for this mode, before an update is requested. A duration of zero means forever. |
| int sig_tone_tx | ( | sig_tone_tx_state_t * | s, | |
| int16_t | amp[], | |||
| int | len | |||
| ) |
Generate a block of signalling tone audio samples.
Generate a block of signalling tone audio samples.
| s | The signalling tone context. | |
| amp | The audio sample buffer. | |
| len | The number of samples to be generated. |
| int sig_tone_tx_free | ( | sig_tone_tx_state_t * | s | ) |
Free a signalling tone transmitter context.
Free a signalling tone transmitter context.
| s | The signalling tone context. |
| sig_tone_tx_state_t* sig_tone_tx_init | ( | sig_tone_tx_state_t * | s, | |
| int | tone_type, | |||
| tone_report_func_t | sig_update, | |||
| void * | user_data | |||
| ) |
Initialise a signalling tone context.
Initialise a signalling tone transmitter context.
| s | The signalling tone context. | |
| tone_type | The type of signalling tone. | |
| sig_update | Callback function to handle signalling updates. | |
| user_data | An opaque pointer. |
| int sig_tone_tx_release | ( | sig_tone_tx_state_t * | s | ) |
Release a signalling tone transmitter context.
Release a signalling tone transmitter context.
| s | The signalling tone context. |
| void sig_tone_tx_set_mode | ( | sig_tone_tx_state_t * | s, | |
| int | mode, | |||
| int | duration | |||
| ) |
Set the tone mode.
Set the tone mode.
| s | The signalling tone context. | |
| mode | The new mode for the transmitted tones. | |
| duration | The duration for this mode, before an update is requested. A duration of zero means forever. |
1.4.7