Registriert seit: 15. Nov 2004
2.647 Beiträge
|
Re: Lauftext arbeitet nicht korrekt
25. Jul 2006, 09:33
Danke, ich habe es jetzt so gelöst:
Delphi-Quellcode:
type
TID3Tag = record
ID: array[0..3] of Char;
Titel: array[0..30] of Char;
Artist: array[0..30] of Char;
Album: array[0..30] of Char;
Year: array[0..4] of Char;
Comment: array[0..30] of Char;
Genre: Byte;
Filename: String;
end;
function ReadID3Tag(const FileName: String): TID3Tag;
begin
FillChar(Result, SizeOf(Result), 0);
with TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone) do
try
Position := Size - 128;
Read(Result.ID, 3);
Read(Result.Titel, 30);
Read(Result.Artist, 30);
Read(Result.Album, 30);
Read(Result.Year, 4);
Read(Result.Comment, 30);
Read(Result.Genre, 1);
Result.Filename := Filename;
finally
Free;
end;
end;
|
|
Zitat
|