Einzelnen Beitrag anzeigen

Benutzerbild von Muellermilchtrinker
Muellermilchtrinker

Registriert seit: 1. Aug 2009
447 Beiträge
 
Delphi 2009 Professional
 
#5

AW: ID3 Tag auslesen mit bass.dll

  Alt 26. Aug 2010, 17:56
Also ich habs jetzt so:

Delphi-Quellcode:
type
  // some standard definition
  PID3V1Rec = ^TID3V1Rec;
  TID3V1Rec = packed record
    Tag: array[0..2] of Char;
    Title: array[0..29] of Char;
    Artist: array[0..29] of Char;
    Album: array[0..29] of Char;
    Year: array[0..3] of Char;
    Comment: array[0..29] of Char;
    Genre: Byte;
  end;

var
  ID3V1Tag: TID3V1Rec;

[...]

function BASS_GetID3TagsID3V1Rec(StreamHandle: Cardinal): TID3V1Rec;
var
  TempID3V1: TID3V1Rec;
  p: PAnsiChar;
begin
  ZeroMemory(@Result, SizeOf(TID3V1Rec));
  if StreamHandle <> 0 then
  begin
    p := BASS_ChannelGetTags(StreamHandle, BASS_TAG_ID3);
    if p <> nil then
    begin
      TempID3V1 := PID3V1Rec(p)^;
      if SameText(TempID3V1.Tag, 'TAG') then Result := TempID3V1;
    end;
  end;
end;

[...]

// in der Procedure:

    ID3V1Tag := BASS_GetID3TagsID3V1Rec(Musicfile);
    Label2.Caption := string(ID3V1Tag.Title) + #13 + string(ID3V1Tag.Artist);
Bekomm aber immer noch nix zurück.
Chuck Norris doesn't need backups. He just uploads his files and lets the world mirror them.
  Mit Zitat antworten Zitat