oki_adpcm.h File Reference
Go to the source code of this file.
Detailed Description
Typedef Documentation
Oki (Dialogic) ADPCM conversion state descriptor. This defines the state of a single working instance of the Oki ADPCM converter. This is used for either linear to ADPCM or ADPCM to linear conversion.
Function Documentation
int oki_adpcm_decode |
( |
oki_adpcm_state_t * |
s, |
|
|
int16_t |
amp[], |
|
|
const uint8_t |
oki_data[], |
|
|
int |
oki_bytes | |
|
) |
| | |
Decode a buffer of Oki ADPCM data to linear PCM.
- Parameters:
-
| s | The Oki ADPCM context. |
| amp | The audio sample buffer. |
| oki_data | |
| oki_bytes | |
- Returns:
- The number of samples returned.
int oki_adpcm_encode |
( |
oki_adpcm_state_t * |
s, |
|
|
uint8_t |
oki_data[], |
|
|
const int16_t |
amp[], |
|
|
int |
len | |
|
) |
| | |
Encode a buffer of linear PCM data to Oki ADPCM.
- Parameters:
-
| s | The Oki ADPCM context. |
| oki_data | The Oki ADPCM data produced |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
- Returns:
- The number of bytes of Oki ADPCM data produced.
Free an Oki ADPCM encode or decode context.
- Parameters:
-
- Returns:
- 0 for OK.
Initialise an Oki ADPCM encode or decode context.
- Parameters:
-
| s | The Oki ADPCM context. |
| bit_rate | The required bit rate for the ADPCM data. The valid rates are 24000 and 32000. |
- Returns:
- A pointer to the Oki ADPCM context, or NULL for error.
Release an Oki ADPCM encode or decode context.
- Parameters:
-
- Returns:
- 0 for OK.