|
spandsp 3.0.0
|
Go to the source code of this file.
Typedefs | |
| typedef struct ima_adpcm_state_s | ima_adpcm_state_t |
Enumerations | |
| enum | { IMA_ADPCM_IMA4 = 0 , IMA_ADPCM_DVI4 = 1 , IMA_ADPCM_VDVI = 2 } |
Functions | |
| ima_adpcm_state_t * | ima_adpcm_init (ima_adpcm_state_t *s, int variant, int chunk_size) |
| int | ima_adpcm_release (ima_adpcm_state_t *s) |
| int | ima_adpcm_free (ima_adpcm_state_t *s) |
| int | ima_adpcm_encode (ima_adpcm_state_t *s, uint8_t ima_data[], const int16_t amp[], int len) |
| int | ima_adpcm_decode (ima_adpcm_state_t *s, int16_t amp[], const uint8_t ima_data[], int ima_bytes) |
| typedef struct ima_adpcm_state_s ima_adpcm_state_t |
IMA (DVI/Intel) ADPCM conversion state descriptor. This defines the state of a single working instance of the IMA ADPCM converter. This is used for either linear to ADPCM or ADPCM to linear conversion.
| anonymous enum |
| int ima_adpcm_decode | ( | ima_adpcm_state_t * | s, |
| int16_t | amp[], | ||
| const uint8_t | ima_data[], | ||
| int | ima_bytes ) |
Decode a buffer of IMA ADPCM data to linear PCM.
| s | The IMA ADPCM context. |
| amp | The audio sample buffer. |
| ima_data | The IMA ADPCM data |
| ima_bytes | The number of bytes of IMA ADPCM data |
References ima_adpcm_state_s::chunk_size, ima_adpcm_decode(), IMA_ADPCM_DVI4, IMA_ADPCM_IMA4, IMA_ADPCM_VDVI, ima_adpcm_state_s::last, and ima_adpcm_state_s::step_index.
Referenced by ima_adpcm_decode().
| int ima_adpcm_encode | ( | ima_adpcm_state_t * | s, |
| uint8_t | ima_data[], | ||
| const int16_t | amp[], | ||
| int | len ) |
Encode a buffer of linear PCM data to IMA ADPCM.
| s | The IMA ADPCM context. |
| ima_data | The IMA ADPCM data produced. |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
References ima_adpcm_state_s::chunk_size, IMA_ADPCM_DVI4, ima_adpcm_encode(), IMA_ADPCM_IMA4, IMA_ADPCM_VDVI, ima_adpcm_state_s::ima_byte, ima_adpcm_state_s::last, and ima_adpcm_state_s::step_index.
Referenced by ima_adpcm_encode().
| int ima_adpcm_free | ( | ima_adpcm_state_t * | s | ) |
Free an IMA ADPCM encode or decode context.
| s | The IMA ADPCM context. |
References ima_adpcm_free().
Referenced by ima_adpcm_free().
| ima_adpcm_state_t * ima_adpcm_init | ( | ima_adpcm_state_t * | s, |
| int | variant, | ||
| int | chunk_size ) |
Initialise an IMA ADPCM encode or decode context.
| s | The IMA ADPCM context. |
| variant | IMA_ADPCM_IMA4, IMA_ADPCM_DVI4, or IMA_ADPCM_VDVI. |
| chunk_size | The size of a chunk, in samples. A chunk size of zero sample samples means treat each encode or decode operation as a chunk. |
References ima_adpcm_state_s::chunk_size, and ima_adpcm_init().
Referenced by ima_adpcm_init().
| int ima_adpcm_release | ( | ima_adpcm_state_t * | s | ) |
Release an IMA ADPCM encode or decode context.
| s | The IMA ADPCM context. |
References ima_adpcm_release().
Referenced by ima_adpcm_release().