Registriert seit: 15. Nov 2004
2.647 Beiträge
|
Re: WMA Tags lesen und SCHREIBEN
30. Sep 2006, 16:57
Delphi-Quellcode:
procedure TfrmMain.UpdateListBox;
var i : integer;
begin
lbList.Clear;
lbList.Items.BeginUpdate;
for i := 0 to length(fFiles) - 1 do
begin
if
lbList.Items.Add(fFiles[i].Artist + ' - ' + fFiles[i].Titel + ' [' + trim(DurationMinSec(IntToStr(GetSongLength))) + ']');
end;
lbList.Items.EndUpdate;
end;
Da kann nichts schief laufen.
Nachtrag:
Delphi-Quellcode:
TAudioFile = class
private
FPfad: string;
FDateiname: string;
FOrdner: string;
FDateiGroesse: Integer;
//WMA-Tags
FWMATrack : Integer;
FWMAYear : Integer;
//OggVorbis-Tags
FOggTrack: Word;
// aus den ID3-Tags (oder andere Meta-Tags)
FArtist: string;
FTitel: string;
FAlbum: string;
FTrack: WideString;
FYear: string;
FGenre: string;
FKommentar: string;
FLyrics: string;
// aus den MPEG-Infos
FDauer: Integer;
FBitrate: word;
Fvbr: boolean;
FChannelMode: String;
FSamplerate:Integer;
FEndung: String;
procedure SetNA(filename: String);
procedure GetMP3Info(filename:string);
procedure GetWMAInfo(filename:string);
procedure GetWAVInfo(filename:string);
procedure GetAIFFInfo(filename:string);
procedure GetOGGInfo(filename:string);
public
property pfad: string read FDateiname;
property Dateiname: string read FDateiname;
property Ordner: string read FOrdner;
property DateiGroesse: Integer read FDateiGroesse;
// OGG-Tags
property OGGTrack: word read FOggTrack;
// aus den ID3-Tags (oder andere Meta-Tags)
property Artist: string read FArtist;
property Titel: string read FTitel;
property Album: string read FAlbum;
property Track: widestring read FTrack;
property Year: string read FYear; // Ja, ein String!
property Genre: string read FGenre;
property Kommentar: string read FKommentar;
property Lyrics: string read FLyrics;
// aus den MPEG-Infos
property Dauer: Integer read FDauer;
property Bitrate: word read FBitrate;
property vbr: boolean read Fvbr;
property ChannelMode: String read FChannelMode;
property Samplerate:Integer read FSamplerate;
property Endung : string read FEndung write FEndung;
constructor create;
destructor destroy; override;
procedure GetAudioData(filename:string);
procedure SaveMP3Info(filename,titel,artist,album,track,year,comment,genre:string);
procedure SaveWMAInfo(filename,a,b,c,d,e,f,g: String);
end;
|
|
Zitat
|