#include<iostream> #include<cstdlib> #include<windows.h> using namespace std; //自定义MP3信息结构 后128字节为TAG开头的信息标记 typedef struct mp3_struct { char head[3];//TAG字符标记 char title[30];//音乐文件名称 char arti[30];//演唱者 char alb[30];//专辑 char year[4];//出版年份 char text[28];//备注内容 char reser; char tra; char genr; }mp3struct; #include "MMSystem.h" int main() { //输出 MP3信息 mp3struct mp3={0}; //C语言实现 //char mp3[128]; FILE *file; file=fopen("光良 - 童话.mp3","r"); fseek(file,-128L,SEEK_END); fgets((char*)&mp3,128,file); cout<<mp3.head[0]<<mp3.head[1]<<mp3.head[2]<<endl; cout<<mp3.title<<endl; cout<<mp3.arti<<endl; cout<<mp3.alb<<endl; cout<<mp3.year[0]<<mp3.year[1]<<mp3.year[2]<<mp3.year[3]<<endl; cout<<mp3.text<<endl; fclose(file); return 0; }
MP3信息
猜你喜欢
转载自blog.csdn.net/d710055071/article/details/47053739
今日推荐
周排行