#ifndef _LYRICS_H_ #define _LYRICS_H_ #include "typedef.h" #include "utils/fs/fs.h" #define LRC_SIZEOF_ALIN(var, al) ((((var)+(al)-1)/(al))*(al)) //类型声明区 typedef struct _TIME_LABEL { /*时间标签信息[mm:ss.ms]*/ u16 dbtime_s; //time of label,unit:s u8 btime_100ms; //time of label,unit:ms u8 btext_len; //the length of lrc content, 占用的实际字节数 u32 wline_pos; //for record next (byte addr) after the (real label of time) } TIME_LABEL; typedef struct __LRC_FILE_IO { int(*seek)(FILE *file, int offset, int orig); int(*read)(FILE *file, void *buf, u32 len); } LRC_FILE_IO; typedef struct _LABEL_INFO { /*标签处理后信息*/ u16 dbtime_base; //first of time u16 dbtime_limit; //end of time u8 base_100ms; //first of time u8 limit_100ms; //first of time u16 dblabel_cnt; //(real label of time) count TIME_LABEL *g_plabel_buf; //解析过程中时间标签存储buf u8 *plabel_buf_tmp; u16 plabel_buf_len; //解析过程中时间标签存储buf长度 } LABEL_INFO; typedef struct _SORTING_INFO { /*文件解析信息*/ u16 dbnow_fp_addr;//current addr of file pointer u8 bdata_len; //the length of lrc content u8 bis_next_file;//jump to next file } SORTING_INFO; typedef struct __LRC_FILE { void *hdl; LRC_FILE_IO *_io; } LRC_FILE; typedef struct _LRC_INFO { ///