Getting Tag Info

Started by kgs1951,

kgs1951

I am trying to get tag information from my stream and it keeps coming up nothing. The code I use is as follows:

Dim tagInfo As TAG_INFO = BassTags.BASS_TAG_GetFromFile("MusicFile")
If Not tagInfo Is Nothing Then
    TextboxArtist.Text = tagInfo.artist
    TextboxTitle.Text = tagInfo.title
End If

My music is tagged. The song is encoded in FLAC. Thanks for anyone's help.

Ian @ un4seen

The BASSFLAC add-on (available from the BASS webpage) is needed for reading tags from FLAC files, so make sure you've previously loaded that via BASS_PluginLoad:

Bass.BASS_PluginLoad("bassflac")

kgs1951

I tried this and it still comes up nothing. I also tried an mp3 file without any luck.These definitely have tag information.

kgs1951

I coded the following:

Bass.BASS_Init(1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)
Bass.BASS_PluginLoad("bassflac.dll")

Is this correct?

kgs1951

I was able to change the coding for taginfo and it worked for me.

Ian @ un4seen

Quote from: kgs1951I coded the following:

Bass.BASS_Init(1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)
Bass.BASS_PluginLoad("bassflac.dll")

Is this correct?

Yes, that looks fine. If you're not playing anything (only reading tags), then you could use the "No Sound" device (0) in the BASS_Init call.

Anyway, good to see that you've got things working now.