jni: add libmpg123
This commit is contained in:
30
app/src/main/cpp/mp3file.h
Normal file
30
app/src/main/cpp/mp3file.h
Normal 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
|
||||
Reference in New Issue
Block a user