jni: add libmpg123

This commit is contained in:
2026-03-02 09:42:44 +01:00
parent fe0b740bff
commit ef5a0e678c
20 changed files with 7862 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
//
// 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