spandsp 3.0.0
|
Go to the source code of this file.
Typedefs | |
typedef struct v18_state_s | v18_state_t |
Functions | |
logging_state_t * | v18_get_logging_state (v18_state_t *s) |
v18_state_t * | v18_init (v18_state_t *s, bool calling_party, int mode, int nation, put_msg_func_t put_msg, void *user_data) |
Initialise a V.18 context. | |
int | v18_release (v18_state_t *s) |
Release a V.18 context. | |
int | v18_free (v18_state_t *s) |
Release a V.18 context. | |
int | v18_tx (v18_state_t *s, int16_t amp[], int max_len) |
Generate a block of V.18 audio samples. | |
int | v18_rx (v18_state_t *s, const int16_t amp[], int len) |
Process a block of received V.18 audio samples. | |
int | v18_rx_fillin (v18_state_t *s, int len) |
Fake processing of a missing block of received V.18 audio samples. | |
int | v18_put (v18_state_t *s, const char msg[], int len) |
Put a string to a V.18 context's input buffer. | |
int | v18_get_current_mode (v18_state_t *s) |
Get the current mode of a V.18 connection. | |
const char * | v18_mode_to_str (int mode) |
Return a short name for an V.18 mode. | |
int v18_free | ( | v18_state_t * | s | ) |
Release a V.18 context.
Free a V.18 context.
s | The V.18 context. |
References queue_release().
int v18_get_current_mode | ( | v18_state_t * | s | ) |
Get the current mode of a V.18 connection.
s | The V.18 context. |
v18_state_t * v18_init | ( | v18_state_t * | s, |
bool | calling_party, | ||
int | mode, | ||
int | nation, | ||
put_msg_func_t | put_msg, | ||
void * | user_data | ||
) |
Initialise a V.18 context.
Initialise a V.18 context.
s | The V.18 context. |
calling_party | True if caller mode, else answerer mode. |
mode | Mode of operation. |
nation | National variant for automoding. |
put_msg | A callback routine called to deliver the received text to the application. |
user_data | An opaque pointer for the callback routine. |
References ASYNC_PARITY_EVEN, ASYNC_PARITY_NONE, async_tx_get_bit(), async_tx_init(), v18_state_s::calling_party, dtmf_rx_init(), dtmf_tx_init(), fsk_rx_init(), fsk_tx_init(), queue_init(), QUEUE_READ_ATOMIC, and QUEUE_WRITE_ATOMIC.
const char * v18_mode_to_str | ( | int | mode | ) |
Return a short name for an V.18 mode.
mode | The code for the V.18 mode. |
int v18_put | ( | v18_state_t * | s, |
const char | msg[], | ||
int | len | ||
) |
Put a string to a V.18 context's input buffer.
s | The V.18 context. |
msg | The string to be added. |
len | The length of the string. If negative, the string is assumed to be a NULL terminated string. |
References queue_write().
int v18_release | ( | v18_state_t * | s | ) |
Release a V.18 context.
Release a V.18 context.
s | The V.18 context. |
References queue_release().
int v18_rx | ( | v18_state_t * | s, |
const int16_t | amp[], | ||
int | len | ||
) |
int v18_rx_fillin | ( | v18_state_t * | s, |
int | len | ||
) |
Fake processing of a missing block of received V.18 audio samples.
Fake processing of a missing block of received V.18 audio samples. (e.g due to packet loss).
s | The V.18 context. |
len | The number of samples to fake. |
References dtmf_rx_fillin(), and fsk_rx_fillin().
int v18_tx | ( | v18_state_t * | s, |
int16_t | amp[], | ||
int | max_len | ||
) |
Generate a block of V.18 audio samples.
Generate a block of V.18 audio samples.
s | The V.18 context. |
amp | The audio sample buffer. |
max_len | The number of samples to be generated. |