Interface.h
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#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