代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
C
】
显示 MP3 文件信息
作者:
/ 发布于
2014/5/22
/
594
显示 MP3 文件信息
/** * This is small example how to use libZPlay library to play files. * This example is using OpenFile functions to open disk files and play. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <olectl.h> #include <ole2.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> #include <dos.h> #include <conio.h> #include "../include/libzplay.h" using namespace libZPlay; ZPlay* player; int __stdcall CallbackFunc(void* instance, void *user_data, TCallbackMessage message, unsigned int param1, unsigned int param2); int main(int argc, char **argv) { // clear screen system("CLS"); // create class instance player = CreateZPlay(); // chek if we have class instance if(player == 0) { printf("Error: Can't create class instance !nPress key to exit.n"); getch(); return 0; } // get library version int ver = player->GetVersion(); // check if we have version 2.00 and above if(ver < 200) { printf("Error: Need library version 2.00 and above !nPress key to exit.\\r\\n"); getch(); player->Release(); return 0; } // display version info printf("libZPlay v.%i.%02i\\r\\n\\r\\n", ver / 100, ver % 100); if(argc > 1) { TID3InfoEx id3_info; if(player->LoadFileID3Ex(argv[1], sfAutodetect, &id3_info, 1)) // loading ID3v2 { printf("Title: %s\\r\\n", id3_info.Title); printf("Artist: %s\\r\\n", id3_info.Artist); printf("Album: %s\\r\\n", id3_info.Album); printf("Year: %s\\r\\n", id3_info.Year); printf("Comment: %s\\r\\n", id3_info.Comment); printf("Genre: %s\\r\\n", id3_info.Genre); printf("Track: %s\\r\\n\\r\\n", id3_info.TrackNum); printf("Artist1 : %s\\r\\n", id3_info.AlbumArtist ); printf("Composer: %s\\r\\n", id3_info.Composer ); printf("Original: %s\\r\\n", id3_info.OriginalArtist ); printf("Copyright: %s\\r\\n", id3_info.Copyright ); printf("URL: %s\\r\\n", id3_info.URL ); printf("Encoder: %s\\r\\n", id3_info.Encoder ); printf("Publisher: %s\\r\\n", id3_info.Publisher ); printf("BPM: %u\\r\\n", id3_info.BPM); printf("MIME: %s\\r\\n", id3_info.Picture.MIMEType); printf("TYPE: %u\\r\\n", id3_info.Picture.PictureType); printf("Desc: %s\\r\\n", id3_info.Picture.Description); printf("Size: %u\\r\\n", id3_info.Picture.PictureDataSize); // draw picture on desktop window player->DrawBitmapToHWND(NULL, 0, 0, 0, 0, id3_info.Picture.hBitmap); } else { printf("No ID3 data\\r\\n\\r\\n"); } } else { // no filename in argument player->Release(); // delete ZPlay class char *end = strrchr(argv[0], '\\'); if(end && *(end + 1) != 0) end++; else end = argv[0]; printf("Usage: %s filename\\r\\n\\r\\nPress key to exit\\r\\n", end); getch(); return 0; } getch(); }
试试其它关键字
MP3
文件信息
同语言下
.
获取手机通讯录 iOS去除数字以外的所有字符
.
异步加载音乐等资源
.
交通罚单管理系统
.
freemark实现,简单的替换
.
计算斐波那契数列
.
base64解码 包括解码长度
.
图像显示
.
冒泡排序
.
输入十进制数,输出指定进制
.
链式栈
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
贡献的其它代码
Label
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3