|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionI wanted to get to the ID3 taqs (artist, album, title, genre, ...) in a WMA file, and found out that it's not quite as straightforward as it is getting the ID3V1.1 tags from an MP3 file. So I created a set of classes, one to get the ID3V1.1 tags from an MP3 file (easy), and another to get the same information out of a WMA file. BackgroundYou can find the ASF specification here: Advanced Systems Format (ASF) Specification. It is the internal file format of a WMA file. Using the codeThe classes are fairly straightforward to use. You simply create an instance of either //
// Allocate a WMAID3Tag and access the fields
//
Try
w = New WMAID3Tag(tbFilename.Text)
Catch ex As Exception
MsgBox(tbFilename.Text & " is not a valid wma" & _
" file or has invalid tag information")
Return
End Try
tbTitle.Text = w.title
tbArtist.Text = w.artist
tbAlbum.Text = w.album
tbGenre.Text = w.genre
tbYear.Text = w.year.ToString
tbTrack.Text = w.track.ToString
tbDescription.Text = w.description
Points of InterestOne interesting side note is that the .NET classes that read/write Unicode strings (like
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||