Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#64

AW: Cover in WMP Format

  Alt 14. Apr 2018, 18:48
Zeig mal Code wo Du error einen Wert zuordnest.
Delphi-Quellcode:
    Error := MP3ERR_None; //<<<
        Picdata.LoadFromFile(Picfile);

        // basic converting
        v23Tag.Artist := MP3Tags.Artist;
        v23Tag.Album := MP3Tags.Album;
        v23Tag.Title := MP3Tags.Title;
        v23Tag.Year := MP3Tags.Year;
    try
      If (MP3Tags.ReadFromFile(mp3File) = MP3ERR_None) Then
      begin

        v23Tag.Track := MP3Tags.Track;
        v23Tag.Genre := MP3Tags.Genre;
        v23Tag.Comment := MP3Tags.Comment;

        if MP3Tags.Rating = 0 then
          v23Tag.Rating := 128 // 3 Sterne
        else
        v23Tag.Rating := MP3Tags.Rating;

        for i := 1 to 16 do
        begin
           b := Random(255);
           GUID.Write(b, 1);
        end;

        v23Tag.SetPrivateFrame('WM/WMCollectionID', GUID);
        v23Tag.SetPrivateFrame('WM/WMCollectionGroupID', GUID);

        v23Tag.SetPicture('image/jpeg', 0, '*', PicData);
        v23Tag.WriteToFile(mp3file);

      end else
      begin
        lblMessageVal.Caption := cMP3Error[Error];
      end;
gruss
  Mit Zitat antworten Zitat