Go to the documentation of this file.
32 #if !defined(_SPANDSP_IMA_ADPCM_H_)
33 #define _SPANDSP_IMA_ADPCM_H_
62 #if defined(__cplusplus)
107 const uint8_t ima_data[],
110 #if defined(__cplusplus)
unsigned long int aborts
The number of HDLC aborts received.
Definition: hdlc.h:70
@ SIG_STATUS_ABORT
An abort signal (e.g. an HDLC abort) has been received.
Definition: async.h:73
hdlc_tx_state_t * hdlc_tx_init(hdlc_tx_state_t *s, int crc32, int inter_frame_flags, int progressive, hdlc_underflow_handler_t handler, void *user_data)
Initialise an HDLC transmitter context.
Definition: hdlc.c:626
void hdlc_rx_set_max_frame_len(hdlc_rx_state_t *s, size_t max_len)
Set the maximum frame length for an HDLC receiver context.
Definition: hdlc.c:300
int ima_adpcm_encode(ima_adpcm_state_t *s, uint8_t ima_data[], const int16_t amp[], int len)
Definition: ima_adpcm.c:425
unsigned long int length_errors
The number of too short and too long frames received.
Definition: hdlc.h:68
int last
The last state of the ADPCM algorithm.
Definition: private/ima_adpcm.h:44
void hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s, int interval)
Set the octet counting report interval.
Definition: hdlc.c:307
unsigned long int good_frames
The number of good frames received.
Definition: hdlc.h:64
@ SIG_STATUS_FRAMING_OK
Packet framing (e.g. HDLC framing) is OK.
Definition: async.h:69
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:42
int ima_adpcm_release(ima_adpcm_state_t *s)
Definition: ima_adpcm.c:296
int ima_adpcm_free(ima_adpcm_state_t *s)
Definition: ima_adpcm.c:302
@ IMA_ADPCM_IMA4
Definition: ima_adpcm.h:48
int step_index
Current index into the step size table.
Definition: private/ima_adpcm.h:46
uint16_t ima_byte
The current IMA code byte in progress.
Definition: private/ima_adpcm.h:48
Definition: private/hdlc.h:32
@ IMA_ADPCM_DVI4
Definition: ima_adpcm.h:50
int ima_adpcm_release(ima_adpcm_state_t *s)
Definition: ima_adpcm.c:296
Definition: private/ima_adpcm.h:38
int hdlc_rx_get_stats(hdlc_rx_state_t *s, hdlc_rx_stats_t *t)
Get the current receive statistics.
Definition: hdlc.c:377
unsigned long int bytes
The number of bytes of good frames received (CRC not included).
Definition: hdlc.h:62
int ima_adpcm_free(ima_adpcm_state_t *s)
Definition: ima_adpcm.c:302
hdlc_rx_state_t * hdlc_rx_init(hdlc_rx_state_t *s, int crc32, int report_bad_frames, int framing_ok_threshold, hdlc_frame_handler_t handler, void *user_data)
Initialise an HDLC receiver context.
Definition: hdlc.c:327
@ IMA_ADPCM_VDVI
Definition: ima_adpcm.h:52
ima_adpcm_state_t * ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size)
Definition: ima_adpcm.c:279
int ima_adpcm_decode(ima_adpcm_state_t *s, int16_t amp[], const uint8_t ima_data[], int ima_bytes)
Definition: ima_adpcm.c:309
int chunk_size
The size of a chunk, in samples.
Definition: private/ima_adpcm.h:42
int hdlc_tx_corrupt_frame(hdlc_tx_state_t *s)
Corrupt the frame currently being transmitted, by giving it the wrong CRC.
Definition: hdlc.c:450
Definition: private/hdlc.h:91
unsigned long int crc_errors
The number of frames with CRC errors received.
Definition: hdlc.h:66
int hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, size_t len)
Transmit a frame.
Definition: hdlc.c:389
ima_adpcm_state_t * ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size)
Definition: ima_adpcm.c:279
int ima_adpcm_decode(ima_adpcm_state_t *s, int16_t amp[], const uint8_t ima_data[], int ima_bytes)
Definition: ima_adpcm.c:309
int hdlc_tx_abort(hdlc_tx_state_t *s)
Send an abort.
Definition: hdlc.c:440
#define STEP_MAX
Definition: ima_adpcm.c:117
int hdlc_tx_flags(hdlc_tx_state_t *s, int len)
Transmit a specified quantity of flag octets, typically as a preamble.
Definition: hdlc.c:424
int ima_adpcm_encode(ima_adpcm_state_t *s, uint8_t ima_data[], const int16_t amp[], int len)
Definition: ima_adpcm.c:425