// // Created by david on 17.05.20. // #ifndef SAMPLES_MP3FILE_H #define SAMPLES_MP3FILE_H #include "mpg123.h" struct MP3File { mpg123_handle* handle; int channels; long rate; long num_samples; int samples_per_frame; double secs_per_frame; long num_frames; double duration; size_t buffer_size; unsigned char* buffer; size_t leftSamples; size_t offset; }; MP3File* mp3file_init(mpg123_handle *handle); void mp3file_delete(MP3File *mp3file); MP3File* mp3file_open(const char *filename, int forceEncoding = 0); #endif //SAMPLES_MP3FILE_H