ppsspp/ext/at3_standalone/at3_decoders.h

27 lines
1.0 KiB
C
Raw Normal View History

2024-04-10 16:26:09 +00:00
#pragma once
#include <cstdint>
// Notes
//
// Performance-wise, these are OK.
// For Atrac3+, the bottleneck is two functions: decode_qu_spectra and ff_atrac3p_ipqf. At least the latter is quite SIMD-able.
2024-04-11 11:34:29 +00:00
// The full external API for the standalone Atrac3/3+ decoder.
2024-04-10 16:26:09 +00:00
2024-04-11 11:34:29 +00:00
struct ATRAC3Context;
struct ATRAC3PContext;
2024-04-10 16:26:09 +00:00
// If the block_align passed in is 0, tries to audio detect.
// flush_buffers should be called when seeking before the next decode_frame.
ATRAC3Context *atrac3_alloc(int channels, int *block_align, const uint8_t *extra_data, int extra_data_size);
2024-04-11 11:34:29 +00:00
void atrac3_free(ATRAC3Context *ctx);
void atrac3_flush_buffers(ATRAC3Context *ctx);
2024-04-11 15:25:36 +00:00
int atrac3_decode_frame(ATRAC3Context *ctx, float *out_data[2], int *nb_samples, const uint8_t *buf, int buf_size);
ATRAC3PContext *atrac3p_alloc(int channels, int *block_align);
void atrac3p_free(ATRAC3PContext *ctx);
void atrac3p_flush_buffers(ATRAC3PContext *ctx);
2024-04-11 15:25:36 +00:00
int atrac3p_decode_frame(ATRAC3PContext *ctx, float *out_data[2], int *nb_samples, const uint8_t *buf, int buf_size);