Interface.h 1.1 KB
#ifndef AUDIO_PLAYER_INTERFACE_H
#define AUDIO_PLAYER_INTERFACE_H
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

enum Decoder{
    MP2 = 0x15000,
    MP3,
    AAC,
    AC3,
    DTS,
    VORBIS,
    DVAUDIO,
    WMAV1,
    WMAV2,
    MACE3,
    MACE6,
    VMDAUDIO,
    FLAC,
    MP3ADU,
    MP3ON4,
    SHORTEN,
    ALAC,
    WESTWOOD_SND1,
    GSM, ///< as in Berlin toast format
    QDM2,
    COOK,
    TRUESPEECH,
    TTA,
    SMACKAUDIO,
    QCELP,
    WAV
};

struct EQValues{
        int GAIN_31Hz;
        int GAIN_62Hz;
        int GAIN_125Hz;
        int GAIN_250Hz;
        int GAIN_500Hz;
        int GAIN_1KHz;
        int GAIN_2KHz;
        int GAIN_4KHz;
        int GAIN_8KHz;
        int GAIN_16KHz;
};

typedef void(*callback)(char* data, int datasize);

//    void hisi_init();
//
//    void hisi_deinit();

void init(enum Decoder decoder,struct EQValues eq_values, callback _callback);

int sendFrame(uint8_t* data, int dataSize);

int rawPlay(int sample_rate, uint8_t* data, int dataSize);

void deInit();

#ifdef __cplusplus
}
#endif


#endif //AUDIO_PLAYER_INTERFACE_H