spandsp 0.0.6
|
Go to the source code of this file.
Typedefs | |
typedef struct sig_tone_tx_state_s | sig_tone_tx_state_t |
typedef struct sig_tone_rx_state_s | sig_tone_rx_state_t |
Enumerations | |
enum | { SIG_TONE_2280HZ = 1 , SIG_TONE_2600HZ , SIG_TONE_2400HZ_2600HZ } |
enum | { SIG_TONE_1_PRESENT = 0x001 , SIG_TONE_1_CHANGE = 0x002 , SIG_TONE_2_PRESENT = 0x004 , SIG_TONE_2_CHANGE = 0x008 , SIG_TONE_TX_PASSTHROUGH = 0x010 , SIG_TONE_RX_PASSTHROUGH = 0x040 , SIG_TONE_RX_FILTER_TONE = 0x080 , SIG_TONE_TX_UPDATE_REQUEST = 0x100 , SIG_TONE_RX_UPDATE_REQUEST = 0x200 } |
Functions | |
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. | |
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. |
anonymous enum |
anonymous enum |
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. |
References sig_tone_flat_coeffs_t::a, sig_tone_flat_coeffs_t::b, sig_tone_rx_state_s::current_notch_filter, sig_tone_rx_state_s::current_rx_tone, sig_tone_rx_state_s::desc, sig_tone_rx_state_s::detection_ratio, sig_tone_descriptor_t::flat, sig_tone_rx_state_s::flat_detection_threshold, sig_tone_rx_state_s::flat_mode, sig_tone_rx_state_s::flat_mode_timeout, sig_tone_rx_state_s::flat_power, sig_tone_rx_state_s::flat_z, sig_tone_rx_state_s::last_sample_tone_present, sig_tone_descriptor_t::notch, sig_tone_rx_state_s::notch_insertion_timeout, sig_tone_descriptor_t::notch_lag_time, sig_tone_rx_state_s::notch_z1, sig_tone_rx_state_s::notch_z2, sig_tone_rx_state_s::power, power_meter_update(), sig_tone_rx_state_s::sharp_detection_threshold, sig_tone_descriptor_t::sharp_flat_timeout, SIG_TONE_1_CHANGE, SIG_TONE_1_PRESENT, SIG_TONE_2_CHANGE, SIG_TONE_2_PRESENT, SIG_TONE_RX_FILTER_TONE, SIG_TONE_RX_PASSTHROUGH, sig_tone_rx_state_s::sig_update, sig_tone_rx_state_s::signalling_state, sig_tone_rx_state_s::signalling_state_duration, sig_tone_descriptor_t::tone_off_check_time, sig_tone_descriptor_t::tone_on_check_time, sig_tone_rx_state_s::tone_persistence_timeout, sig_tone_descriptor_t::tones, and sig_tone_rx_state_s::user_data.
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. |
References sig_tone_rx_state_s::desc, sig_tone_descriptor_t::detection_ratio, sig_tone_rx_state_s::detection_ratio, sig_tone_descriptor_t::flat_detection_threshold, sig_tone_rx_state_s::flat_detection_threshold, sig_tone_rx_state_s::flat_power, sig_tone_rx_state_s::flat_z, sig_tone_rx_state_s::last_sample_tone_present, sig_tone_rx_state_s::notch_z1, sig_tone_rx_state_s::notch_z2, sig_tone_rx_state_s::power, power_meter_init(), power_meter_level_dbm0(), sig_tone_descriptor_t::sharp_detection_threshold, sig_tone_rx_state_s::sharp_detection_threshold, sig_tone_rx_state_s::sig_update, and sig_tone_rx_state_s::user_data.
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. |
References sig_tone_rx_state_s::current_rx_tone.
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. |
References sig_tone_tx_state_s::current_tx_timeout, sig_tone_tx_state_s::current_tx_tone, dds_mod(), sig_tone_tx_state_s::desc, sig_tone_tx_state_s::high_low_timer, sig_tone_tx_state_s::phase_acc, sig_tone_tx_state_s::phase_rate, SIG_TONE_1_PRESENT, SIG_TONE_2_PRESENT, SIG_TONE_TX_PASSTHROUGH, SIG_TONE_TX_UPDATE_REQUEST, sig_tone_tx_state_s::sig_update, sig_tone_tx_state_s::tone_scaling, sig_tone_descriptor_t::tones, and sig_tone_tx_state_s::user_data.
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. |
References dds_phase_rate(), dds_scaling_dbm0(), sig_tone_tx_state_s::desc, sig_tone_tx_state_s::phase_rate, sig_tone_tx_state_s::sig_update, sig_tone_descriptor_t::tone_amp, sig_tone_descriptor_t::tone_freq, sig_tone_tx_state_s::tone_scaling, and sig_tone_tx_state_s::user_data.
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. |
References sig_tone_tx_state_s::current_tx_timeout, sig_tone_tx_state_s::current_tx_tone, sig_tone_tx_state_s::desc, sig_tone_descriptor_t::high_low_timeout, sig_tone_tx_state_s::high_low_timer, sig_tone_tx_state_s::phase_acc, SIG_TONE_1_PRESENT, and SIG_TONE_2_PRESENT.