歌词解析: 打开歌词文件,文件大小测试打印,歌曲调用mplayer播放,为歌词内容申请内存
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#ifndef _CONSOLE_H_
|
||||
#define _CONSOLE_H_
|
||||
|
||||
#define COLOR_RED 31
|
||||
#define COLOR_BLACK 30
|
||||
#define COLOR_GREEN 32
|
||||
#define COLOR_BLUE 34
|
||||
#define COLOR_YELLOW 33
|
||||
#define COLOR_WHITE 37
|
||||
#define COLOR_CYAN 36
|
||||
#define COLOR_MAGENTA 35
|
||||
/*
|
||||
COLOR_RED 红
|
||||
COLOR_BLACK 黑
|
||||
COLOR_GREEN 绿
|
||||
COLOR_BLUE 蓝
|
||||
COLOR_YELLOW 黄
|
||||
COLOR_WHITE 白
|
||||
COLOR_CYAN 青
|
||||
COLOR_MAGENTA 洋红
|
||||
*/
|
||||
|
||||
extern void cusor_moveto(int x, int y);//光标跳转到 y行 x列
|
||||
extern void cusor_get_pos(void);//保存光标位置
|
||||
extern void cusor_hide(void);
|
||||
extern void cusor_set_pos(void);//恢复光标位置
|
||||
extern void clear_screen(void);//清屏
|
||||
extern void set_fg_color(int color);//设置字体前景色
|
||||
extern void set_bg_color(int color);//设置字体背景色
|
||||
|
||||
#endif //_CONSOLE_H_
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __LRC_H__
|
||||
#define __LRC_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
FILE *open_lrc_file(const char *lrc_path); // 打开歌词文件
|
||||
long get_lrc_size(FILE *fp); // 获取歌词文件大小
|
||||
|
||||
#endif
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#ifndef __START_MPLAYER_H__
|
||||
#define __START_MPLAYER_H__
|
||||
//启动mplayer播放器
|
||||
//参数song_path 为歌曲的路径
|
||||
extern void mplayer_play(const char *song_path);
|
||||
#endif
|
||||
Reference in New Issue
Block a user