diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 15:36:26 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 15:36:26 -0300 |
| commit | 63f0e0dea3a9d44201db408c4e2c3f2f5b2b94d6 (patch) | |
| tree | 86f0dcad8070e2a3a693ef4897aa83950cfeb224 /runtime/xma_decoder/leonida_xma2_decoder.h | |
| parent | f78f7d6a2a9364cb128c03ac539fe540d5c70df1 (diff) | |
| parent | 6dda0630bd6fc0514baadb94fb98e36bd7d64c0b (diff) | |
Merge main into fix/walk-bink_names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/leonida_xma2_decoder.h')
| -rw-r--r-- | runtime/xma_decoder/leonida_xma2_decoder.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/runtime/xma_decoder/leonida_xma2_decoder.h b/runtime/xma_decoder/leonida_xma2_decoder.h new file mode 100644 index 000000000..98dd5c49c --- /dev/null +++ b/runtime/xma_decoder/leonida_xma2_decoder.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #ifndef LEONIDA_XMA2_DECODER_H | ||
| 2 | #define LEONIDA_XMA2_DECODER_H | ||
| 3 | |||
| 4 | #include <stddef.h> | ||
| 5 | #include <stdint.h> | ||
| 6 | |||
| 7 | #ifdef __cplusplus | ||
| 8 | extern "C" { | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #define LEONIDA_XMA2_PACKET_BYTES 2048u | ||
| 12 | |||
| 13 | typedef struct LeonidaXma2Decoder LeonidaXma2Decoder; | ||
| 14 | typedef struct LeonidaXma2PcmBlock LeonidaXma2PcmBlock; | ||
| 15 | |||
| 16 | enum LeonidaXma2Status { | ||
| 17 | LEONIDA_XMA2_OK = 0, | ||
| 18 | LEONIDA_XMA2_INVALID_ARGUMENT = 1, | ||
| 19 | LEONIDA_XMA2_INVALID_FORMAT = 2, | ||
| 20 | LEONIDA_XMA2_BAD_PACKET_SIZE = 3, | ||
| 21 | LEONIDA_XMA2_OUT_OF_MEMORY = 4, | ||
| 22 | LEONIDA_XMA2_DECODER_FAILURE = 5, | ||
| 23 | LEONIDA_XMA2_PANIC = 6, | ||
| 24 | }; | ||
| 25 | |||
| 26 | int32_t leonida_xma2_decoder_create(uint32_t sample_rate, uint32_t channels, | ||
| 27 | LeonidaXma2Decoder **out_decoder); | ||
| 28 | int32_t leonida_xma2_decode_buffer(LeonidaXma2Decoder *decoder, | ||
| 29 | const uint8_t *input, size_t input_len, | ||
| 30 | LeonidaXma2PcmBlock **out_block); | ||
| 31 | void leonida_xma2_decoder_destroy(LeonidaXma2Decoder *decoder); | ||
| 32 | const int16_t *leonida_xma2_pcm_data(const LeonidaXma2PcmBlock *block); | ||
| 33 | size_t leonida_xma2_pcm_sample_count(const LeonidaXma2PcmBlock *block); | ||
| 34 | void leonida_xma2_pcm_destroy(LeonidaXma2PcmBlock *block); | ||
| 35 | |||
| 36 | #ifdef __cplusplus | ||
| 37 | } | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #endif | ||