47 lines
1022 B
C
47 lines
1022 B
C
#ifndef _API_MUSIC_H
|
|
#define _API_MUSIC_H
|
|
|
|
enum {
|
|
MUSIC_STOP = 0,
|
|
MUSIC_PAUSE,
|
|
MUSIC_PLAYING,
|
|
};
|
|
|
|
enum {
|
|
//decode msg
|
|
MUSIC_MSG_STOP = 0,
|
|
MUSIC_MSG_PAUSE,
|
|
MUSIC_MSG_PLAY,
|
|
|
|
//encode msg
|
|
ENC_MSG_MP3 = 64,
|
|
ENC_MSG_AEC,
|
|
ENC_MSG_ALC,
|
|
ENC_MSG_PLC,
|
|
ENC_MSG_SBC,
|
|
ENC_MSG_WAV,
|
|
ENC_MSG_ADPCM,
|
|
};
|
|
|
|
enum {
|
|
QSKIP_BACKWARD,
|
|
QSKIP_FORWARD,
|
|
};
|
|
|
|
extern unsigned char avio_buf[556];
|
|
|
|
void music_control(u8 msg);
|
|
u8 get_music_dec_sta(void);
|
|
int music_decode_init(void);
|
|
int sbcio_decode_init(void);
|
|
void sbc_decode_init(void);
|
|
u16 music_get_total_time(void);
|
|
u16 music_get_cur_time(void);
|
|
void music_set_cur_time(u32 cur_time);
|
|
u32 get_music_bitrate(void);
|
|
void music_stream_var_init(void);
|
|
int music_is_encrypt(u16 key); //返回0表示为加密音乐
|
|
void music_stream_decrypt(void *buf, unsigned int len);
|
|
void spiflash_rec_mp3_filelen_reduce(u16 ms); //剪掉REC尾部 ms(spiflash)
|
|
#endif // _API_MUSIC_H
|