×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Xojo
Posted by: Radium Kymist
Added: Feb 7, 2015 12:55 PM
Views: 26
Tags: mp3 tag id3
Retrieves all MP3 ID3 Tag Data

By simulanics
  1. dim f as FolderItem, readMP3 as BinaryStream
  2.   dim mb as MemoryBlock
  3.   dim output,  tag, song, artist, album, year, comment as String
  4.  
  5.   f = GetOpenFolderItem("")
  6.  
  7.   if f <> nil then
  8.    
  9.     readMP3 = BinaryStream.Open(f,false)
  10.     readMP3.Position = (readMP3.Length - 128)
  11.      
  12.     mb =  readMP3.Read(readMP3.Length)
  13.      
  14.     tag = mb.StringValue(0,3)
  15.     song = mb.StringValue(3,30)
  16.     artist = mb.StringValue(33,30)
  17.     album = mb.StringValue(63,30)
  18.     year = mb.StringValue(93,4)
  19.     comment = mb.StringValue(97,30)
  20.    
  21.     textArea1.text = artist
  22.     textArea1.text = textArea1.text + " - " + album
  23.     textArea1.text = textArea1.text + " - " + song
  24.     textArea1.text = textArea1.text + " - " + year
  25.     textArea1.text = textArea1.text + " - " + comment
  26.    
  27.   end if