(CodeLib-Manager)
Registriert seit: 10. Jun 2002
4.648 Beiträge
Delphi XE Professional
|
Re: Songlänge auslesen
11. Feb 2005, 16:26
Hi,
Du könntest auch die MPGTools Unit nehmen.
URL http://www.dv.co.yu/mpgscript/download.htm
Zitat:
Base of this unit is TMPEGAudio class which deals with single MPEG audio file. MPEG audio version 1 and 2, layer I, II and III are supported. MPEG Audio compressed WAV files too. It allows easy access to MPEG TAG, and HEADER info (ID3v1.1). Writes TAG to MPEG file, also can completely remove tag from file. You will also find very powerful method which converts string macros (more than 70 predefined macros and option to create your own) to MPEG data. Other class is TMPEGAudioList which deals with lists of MPEG data, including importing data from MPEG files, WinAmp playlists and MPEG Datalists. List sorting capabilities included.
Beispiel:
Code:
uses
MPGTools; // (Siehe Download)
procedure TForm1.Button1Click(Sender: TObject);
var
MPEGFile: TMPEGAudio;
begin
{ create object }
MPEGFile := TMPEGAudio.Create;
try
{ load data for mp3 song }
MPEGFile.FileName := 'D:\Mp3s\XYZ.mp3';
Label1.Caption := IntToStr(MPEGFile.Duration);
{ free }
finally
MPEGFile.Free;
end;
end;
Thomas
|
|
Zitat
|