Registriert seit: 15. Nov 2004
2.647 Beiträge
|
Re: Lauftext arbeitet nicht korrekt
25. Jul 2006, 08:42
Delphi-Quellcode:
function TfrmMain.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);
Result.ID := Copy(Buffer, 1, 3);
Result.Titel := Copy(Buffer, 4, 30);
Result.Artist := Copy(Buffer, 34, 30);
Result.Album := Copy(Buffer, 64, 30);
Result.Year := Copy(Buffer, 94, 4);
Result.Comment := Copy(Buffer, 98, 30);
Result.Genre := Ord(Buffer[128]);
Result.FileName := FileName;
finally
FS.Free;
end;
end;
|
|
Zitat
|