34#if !defined(_SPANDSP_V18_H_)
35#define _SPANDSP_V18_H_
41 V18_MODE_NONE = 0x0001,
43 V18_MODE_5BIT_4545 = 0x0002,
45 V18_MODE_5BIT_50 = 0x0004,
47 V18_MODE_DTMF = 0x0008,
49 V18_MODE_EDT = 0x0010,
51 V18_MODE_BELL103 = 0x0020,
53 V18_MODE_V23VIDEOTEX = 0x0040,
55 V18_MODE_V21TEXTPHONE = 0x0080,
57 V18_MODE_V18TEXTPHONE = 0x0100,
59 V18_MODE_5BIT_476 = 0x0200,
61 V18_MODE_REPETITIVE_SHIFTS_OPTION = 0x1000
67 V18_AUTOMODING_GLOBAL = 0,
72 V18_AUTOMODING_AUSTRALIA,
73 V18_AUTOMODING_IRELAND,
76 V18_AUTOMODING_GERMANY,
77 V18_AUTOMODING_SWITZERLAND,
80 V18_AUTOMODING_AUSTRIA,
83 V18_AUTOMODING_NETHERLANDS,
86 V18_AUTOMODING_ICELAND,
87 V18_AUTOMODING_NORWAY,
88 V18_AUTOMODING_SWEDEN,
89 V18_AUTOMODING_FINALND,
90 V18_AUTOMODING_DENMARK,
99 V18_AUTOMODING_FRANCE,
100 V18_AUTOMODING_BELGIUM,
105#if defined(__cplusplus)
122SPAN_DECLARE(v18_state_t *)
v18_init(v18_state_t *s,
139SPAN_DECLARE(
int)
v18_free(v18_state_t *s);
148SPAN_DECLARE(
int)
v18_tx(v18_state_t *s, int16_t amp[],
int max_len);
157SPAN_DECLARE(
int)
v18_rx(v18_state_t *s,
const int16_t amp[],
int len);
176SPAN_DECLARE(
int)
v18_put(v18_state_t *s,
const char msg[],
int len);
189#if defined(__cplusplus)
void(* put_msg_func_t)(void *user_data, const uint8_t *msg, int len)
Definition async.h:95
struct logging_state_s logging_state_t
Definition logging.h:72
Definition private/v18.h:30
bool calling_party
True if we are the calling modem.
Definition private/v18.h:32
int v18_free(v18_state_t *s)
Release a V.18 context.
Definition v18.c:1228
int v18_rx(v18_state_t *s, const int16_t amp[], int len)
Process a block of received V.18 audio samples.
Definition v18.c:1009
const char * v18_mode_to_str(int mode)
Return a short name for an V.18 mode.
Definition v18.c:1091
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.
Definition v18.c:1126
int v18_rx_fillin(v18_state_t *s, int len)
Fake processing of a missing block of received V.18 audio samples.
Definition v18.c:1040
int v18_tx(v18_state_t *s, int16_t amp[], int max_len)
Generate a block of V.18 audio samples.
int v18_get_current_mode(v18_state_t *s)
Get the current mode of a V.18 connection.
int v18_put(v18_state_t *s, const char msg[], int len)
Put a string to a V.18 context's input buffer.
Definition v18.c:1071
int v18_release(v18_state_t *s)
Release a V.18 context.
Definition v18.c:1221