歌词解析: 大致上能用了
This commit is contained in:
@@ -7,13 +7,19 @@
|
||||
|
||||
typedef struct lrc
|
||||
{
|
||||
int time; // 歌词时间点
|
||||
int time; // 歌词时间点
|
||||
// long time; // 用于毫秒级延时
|
||||
char lrc_buf[200]; // 歌词内容
|
||||
int lrc_cur_num; // 当前歌词行数, 用于标记当前歌词(第几句歌词 从1开始)
|
||||
struct lrc *next; // 指向下一行歌词(指向链表下一个节点)
|
||||
|
||||
struct lrc *next; // 指向下一行歌词(指向链表下一个节点)
|
||||
} LRC;
|
||||
|
||||
FILE *open_lrc_file(const char *lrc_path); // 打开歌词文件
|
||||
long get_lrc_size(FILE *fp); // 获取歌词文件大小
|
||||
FILE *open_lrc_file(const char *lrc_path); // 打开歌词文件
|
||||
long get_lrc_size(FILE *fp); // 获取歌词文件大小
|
||||
char *get_lrc_mem_data(FILE *fp); // 获取歌词文件内容
|
||||
LRC *insert_lrc_node(LRC *head, LRC new_node); // 插入歌词节点 (尾插法)
|
||||
LRC *search_lrc_node(LRC *head, int time); // 查找歌词节点 (根据时间点查找歌词节点)
|
||||
// LRC *search_lrc_node(LRC *head, long time); // 查找歌词节点 (根据时间点查找歌词节点) (用于毫秒级延时)
|
||||
|
||||
#endif
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __TIME_DELAY_H__
|
||||
|
||||
// 自封装延时函数
|
||||
void time_delay(int sec);
|
||||
void time_delay(int sec); // 延时指定秒数
|
||||
void delay_ms(int milliseconds); // 延迟指定毫秒数
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user