Delphi中如何读取出MP3文件的信息
来源:互联网 发布:手机淘宝怎么提交改价 编辑:程序博客网 时间:2024/03/29 07:03
<P><FONT face=宋体>interface</FONT></P><P><FONT face=宋体>uses<BR> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<BR> Dialogs, StdCtrls;</FONT></P><P><FONT face=宋体>type<BR> TID3Tag=packed record //128字节<BR> TAGID: array[0..2] of Char; //3字节:必须是TAG<BR> Title: array[0..29] of Char; //30字节:歌曲标题<BR> Artist: array[0..29] of Char; //30字节:歌曲的艺术家<BR> Album: array[0..29] of Char; //30字节:歌曲专辑<BR> Year: array[0..3] of Char; //4字节:出版年<BR> Comment: array[0..29] of Char; //30字节: 评论<BR> Genre: byte; //1 字节: 种类标识<BR> end; </FONT></P><P><FONT face=宋体> TForm1 = class(TForm)<BR> Button1: TButton;<BR> procedure Button1Click(Sender: TObject);<BR> private<BR> { Private declarations }<BR> public<BR> { Public declarations }<BR> end;</FONT></P><P><FONT face=宋体>var<BR> Form1: TForm1;</FONT></P><P><FONT face=宋体>implementation</FONT></P><P><FONT face=宋体>{$R *.dfm}</FONT></P><P><FONT face=宋体>function GetMp3TAG(const Mp3FileName:string):TID3Tag;<BR>var<BR> mp3file: TFileStream;<BR>begin<BR> mp3file:=TFileStream.create(Mp3FileName,$0000);<BR> try<BR> mp3file.Position:=mp3file.size-128; //跳到id3-tag<BR> mp3file.Read(Result,SizeOf(Result));<BR> finally<BR> mp3file.free;<BR> end;<BR>end;</FONT></P><P><FONT face=宋体>procedure TForm1.Button1Click(Sender: TObject);<BR> var <BR> m:TID3TAg;<BR>begin<BR> m:=GetMp3tag('E:\Music\MYLOVE\test.mp3');<BR> ShowMessage(m.Title+' '+m.Artist+' '+m.Album+' '+m.Year+' '+m.Comment);<BR>end;</FONT></P><P><FONT face=宋体>end.<BR></FONT></P>
0 0
- Delphi中如何读取出MP3文件的信息
- 如何读取MP3的信息
- 如何读取MP3歌曲文件标志信息
- android 读取SD卡中MP3文件的信息
- 读取MP3文件的ID3v1信息
- C语言读取mp3文件的信息
- php读取mp3文件信息
- 关于MP3文件的各种信息的读取方法
- java读取MP3的信息
- 如何读取MP3头文件
- 读取sdcard中mp3文件
- C#中如何获取.mp3文件的歌手名以及其它相关信息
- ASP读取WMA,MP3文件信息类
- 声音文件读取(未实现)--MP3 文件的ID3V1信息与ID3V2信息结构的分析
- C++ 如何读取文件的版本信息
- 读取MP3详情信息
- java 读取 mp3 信息
- delphi 文件的读取
- 指针和数组参数
- ZendStudio调试php脚本环境安装布置(备忘)
- Linux SPI框架 (3)
- Android Studio开发环境的搭建
- Android 从小白到大拿之路——数字时钟和虚拟时钟的实现
- Delphi中如何读取出MP3文件的信息
- poj 1002 487-3279 AC代码
- 二进制包安装mysql
- UVa102 Ecological Bin Packing(翻译+题解)
- 常用rman命令
- 20150203-ServletResponse和ServletRequest
- [每天一个知识点]23-软件工程-有什么必要要提高生产力
- Linux内核的Nand驱动流程分析
- BP神经网络算法学习