DataHoarder
d4fe18abce
All checks were successful
continuous-integration/drone/push Build is passing
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
void *ptr;
|
|
int sample_rate;
|
|
int channels;
|
|
int bit_depth;
|
|
int input_packet_size;
|
|
int output_max_packet_size;
|
|
int magic_cookie_size;
|
|
int frames_per_packet;
|
|
} alac_encoder;
|
|
|
|
alac_encoder alac_encoder_new(int sampleRate, int channels, int bitDepth, int fastMode);
|
|
int alac_encoder_get_magic_cookie(alac_encoder* encoder, unsigned char * output);
|
|
int alac_encoder_write(alac_encoder* encoder, const unsigned char * input, int input_size, unsigned char * output);
|
|
void alac_encoder_delete(alac_encoder* encoder);
|
|
|
|
typedef struct {
|
|
void *ptr;
|
|
int sample_rate;
|
|
int channels;
|
|
int bit_depth;
|
|
int frames_per_packet;
|
|
int input_max_packet_size;
|
|
int output_packet_size;
|
|
|
|
} alac_decoder;
|
|
|
|
typedef struct {
|
|
int input_bytes_used;
|
|
int output_bytes;
|
|
|
|
} alac_decoder_read_result;
|
|
|
|
alac_decoder alac_decoder_new(const unsigned char* magicCookie, int magicCookieSize);
|
|
alac_decoder_read_result alac_decoder_read(alac_decoder* decoder, const unsigned char * input, int input_size, unsigned char * output);
|
|
void alac_decoder_delete(alac_decoder* decoder);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |