libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
minimp3.h
1#ifndef __MINIMP3_H_INCLUDED__
2#define __MINIMP3_H_INCLUDED__
3
4#define MP3_MAX_SAMPLES_PER_FRAME (1152*2)
5
6typedef struct _mp3_info {
7 int sample_rate;
8 int channels;
9 int audio_bytes; // generated amount of audio per frame
11
12typedef void* mp3_decoder_t;
13
14extern mp3_decoder_t mp3_create(void);
15extern int mp3_decode(mp3_decoder_t *dec, void *buf, int bytes, signed short *out, mp3_info_t *info);
16extern void mp3_done(mp3_decoder_t *dec);
17#define mp3_free(dec) do { mp3_done(dec); dec = NULL; } while(0)
18
19#endif//__MINIMP3_H_INCLUDED__