继续卖身:我都快没命了,哪为好心人帮帮我,怎样查看mp3文件的代码,还有怎么实现wav压缩为mp3或是其他的文件格式都可以(希望您能施舍 等我做好了这个课题小弟一定报答您 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 >>怎样查看mp3文件的代码{ Byte 1-3 = ID 'TAG' Byte 4-33 = Titel / Title Byte 34-63 = Artist Byte 64-93 = Album Byte 94-97 = Jahr / Year Byte 98-127 = Kommentar / Comment Byte 128 = Genre } type TID3Tag = record ID: string[3]; Titel: string[30]; Artist: string[30]; Album: string[30]; Year: string[4]; Comment: string[30]; Genre: Byte; end; const Genres : array[0..146] of string = ('Blues','Classic Rock','Country','Dance','Disco','Funk','Grunge', 'Hip- Hop','Jazz','Metal','New Age','Oldies','Other','Pop','R&B', 'Rap','Reggae','Rock','Techno','Industrial','Alternative','Ska', 'Death Metal','Pranks','Soundtrack','Euro-Techno','Ambient', 'Trip-Hop','Vocal','Jazz+Funk','Fusion','Trance','Classical', 'Instrumental','Acid','House','Game','Sound Clip','Gospel','Noise', 'Alternative Rock','Bass','Punk','Space','Meditative','Instrumental Pop', 'Instrumental Rock','Ethnic','Gothic','Darkwave','Techno-Industrial','Electronic', 'Pop-Folk','Eurodance','Dream','Southern Rock','Comedy','Cult','Gangsta', 'Top 40','Christian Rap','Pop/Funk','Jungle','Native US','Cabaret','New Wave', 'Psychadelic','Rave','Showtunes','Trailer','Lo-Fi','Tribal','Acid Punk', 'Acid Jazz','Polka','Retro','Musical','Rock & Roll','Hard Rock','Folk', 'Folk-Rock','National Folk','Swing','Fast Fusion','Bebob','Latin','Revival', 'Celtic','Bluegrass','Avantgarde','Gothic Rock','Progressive Rock', 'Psychedelic Rock','Symphonic Rock','Slow Rock','Big Band','Chorus', 'Easy Listening','Acoustic','Humour','Speech','Chanson','Opera', 'Chamber Music','Sonata','Symphony','Booty Bass','Primus','Porn Groove', 'Satire','Slow Jam','Club','Tango','Samba','Folklore','Ballad', 'Power Ballad','Rhytmic Soul','Freestyle','Duet','Punk Rock','Drum Solo', 'Acapella','Euro-House','Dance Hall','Goa','Drum & Bass','Club-House', 'Hardcore','Terror','Indie','BritPop','Negerpunk','Polsk Punk','Beat', 'Christian Gangsta','Heavy Metal','Black Metal','Crossover','Contemporary C', 'Christian Rock','Merengue','Salsa','Thrash Metal','Anime','JPop','SynthPop'); var Form1: TForm1; implementation {$R *.dfm} function readID3Tag(FileName: string): TID3Tag; var FS: TFileStream; Buffer: array [1..128] of Char; begin FS := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite); try FS.Seek(-128, soFromEnd); FS.Read(Buffer, 128); with Result do begin ID := Copy(Buffer, 1, 3); Titel := Copy(Buffer, 4, 30); Artist := Copy(Buffer, 34, 30); Album := Copy(Buffer, 64, 30); Year := Copy(Buffer, 94, 4); Comment := Copy(Buffer, 98, 30); Genre := Ord(Buffer[128]); end; finally FS.Free; end; end; procedure TfrmMain.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then begin with readID3Tag(OpenDialog1.FileName) do begin LlbID.Caption := 'ID: ' + ID; LlbTitel.Caption := 'Titel: ' + Titel; LlbArtist.Caption := 'Artist: ' + Artist; LlbAlbum.Caption := 'Album: ' + Album; LlbYear.Caption := 'Year: ' + Year; LlbComment.Caption := 'Comment: ' + Comment; if (Genre >= 0) and (Genre <=146) then LlbGenre.Caption := 'Genre: ' + Genres[Genre] else LlbGenre.Caption := 'N/A'; end; end; end; http://article.pchome.net/2003/11/12/14318.htm 总结与分享DELPHI编程之图表功能实现方法 急急急,RAVE导出繁体中文PDF后,数字和标点符号格式不对 如何卸载带有窗口的DLL? 难以解决的一个简单问题! 一个SQL语句的问题(在线等,谢谢) delphi有扫描文字识别的组件嘛? 哪位大哥能帮我把这两个BCB小函数转为Delphi.急...急...急...急...急...急...急...急... 怎样动态得到窗体标题? grid中的应用 如何拦截API? 发现DELPHI7.1 update升级后好像ADOQUERY对INT64的支持有BUG CSDN活过来了,今天再散200分收山,马上结帖,接分要快(前五名)。
{
Byte 1-3 = ID 'TAG'
Byte 4-33 = Titel / Title
Byte 34-63 = Artist
Byte 64-93 = Album
Byte 94-97 = Jahr / Year
Byte 98-127 = Kommentar / Comment
Byte 128 = Genre
}
type
TID3Tag = record
ID: string[3];
Titel: string[30];
Artist: string[30];
Album: string[30];
Year: string[4];
Comment: string[30];
Genre: Byte;
end; const
Genres : array[0..146] of string =
('Blues','Classic Rock','Country','Dance','Disco','Funk','Grunge',
'Hip- Hop','Jazz','Metal','New Age','Oldies','Other','Pop','R&B',
'Rap','Reggae','Rock','Techno','Industrial','Alternative','Ska',
'Death Metal','Pranks','Soundtrack','Euro-Techno','Ambient',
'Trip-Hop','Vocal','Jazz+Funk','Fusion','Trance','Classical',
'Instrumental','Acid','House','Game','Sound Clip','Gospel','Noise',
'Alternative Rock','Bass','Punk','Space','Meditative','Instrumental Pop',
'Instrumental Rock','Ethnic','Gothic','Darkwave','Techno-Industrial','Electronic',
'Pop-Folk','Eurodance','Dream','Southern Rock','Comedy','Cult','Gangsta',
'Top 40','Christian Rap','Pop/Funk','Jungle','Native US','Cabaret','New Wave',
'Psychadelic','Rave','Showtunes','Trailer','Lo-Fi','Tribal','Acid Punk',
'Acid Jazz','Polka','Retro','Musical','Rock & Roll','Hard Rock','Folk',
'Folk-Rock','National Folk','Swing','Fast Fusion','Bebob','Latin','Revival',
'Celtic','Bluegrass','Avantgarde','Gothic Rock','Progressive Rock',
'Psychedelic Rock','Symphonic Rock','Slow Rock','Big Band','Chorus',
'Easy Listening','Acoustic','Humour','Speech','Chanson','Opera',
'Chamber Music','Sonata','Symphony','Booty Bass','Primus','Porn Groove',
'Satire','Slow Jam','Club','Tango','Samba','Folklore','Ballad',
'Power Ballad','Rhytmic Soul','Freestyle','Duet','Punk Rock','Drum Solo',
'Acapella','Euro-House','Dance Hall','Goa','Drum & Bass','Club-House',
'Hardcore','Terror','Indie','BritPop','Negerpunk','Polsk Punk','Beat',
'Christian Gangsta','Heavy Metal','Black Metal','Crossover','Contemporary C',
'Christian Rock','Merengue','Salsa','Thrash Metal','Anime','JPop','SynthPop');
var
Form1: TForm1; implementation {$R *.dfm} function readID3Tag(FileName: string): TID3Tag;
var
FS: TFileStream;
Buffer: array [1..128] of Char;
begin
FS := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
try
FS.Seek(-128, soFromEnd);
FS.Read(Buffer, 128);
with Result do
begin
ID := Copy(Buffer, 1, 3);
Titel := Copy(Buffer, 4, 30);
Artist := Copy(Buffer, 34, 30);
Album := Copy(Buffer, 64, 30);
Year := Copy(Buffer, 94, 4);
Comment := Copy(Buffer, 98, 30);
Genre := Ord(Buffer[128]);
end;
finally
FS.Free;
end;
end; procedure TfrmMain.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
with readID3Tag(OpenDialog1.FileName) do
begin
LlbID.Caption := 'ID: ' + ID;
LlbTitel.Caption := 'Titel: ' + Titel;
LlbArtist.Caption := 'Artist: ' + Artist;
LlbAlbum.Caption := 'Album: ' + Album;
LlbYear.Caption := 'Year: ' + Year;
LlbComment.Caption := 'Comment: ' + Comment;
if (Genre >= 0) and (Genre <=146) then
LlbGenre.Caption := 'Genre: ' + Genres[Genre]
else
LlbGenre.Caption := 'N/A';
end;
end;
end;