BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_ChannelGetTagsICY Method BASS.NET API for the Un4seen BASS Audio Library
Retrieves the ICY (Shoutcast) tags from a channel, if they are available.

This special helper method already evaluates the null-terminated and variable length data block using ANSI strings.

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version:

public static string[] BASS_ChannelGetTagsICY(
	int handle


Type: SystemInt32
The channel handle.

Return Value

Type: String
or an array of strings. Each array element will represent one ICY entry, e.g. "icy-name: name of the stream"

Only available when streaming from Shoutcast.

In addition you might also use the BassTags class, which provides extended TAG reading support.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe requested tags are not available.


Dim stream As Integer = Bass.BASS_StreamCreateURL("", 0, 
                             BASSFlag.BASS_STREAM_STATUS, Nothing, IntPtr.Zero)
Dim tags As String() = Bass.BASS_ChannelGetTagsICY(stream)
If tags Is Nothing Then
  ' try http...
  tags = Bass.BASS_ChannelGetTagsHTTP(stream)
End If
If Not (tags Is Nothing) Then
  Dim tag As String
  For Each tag In tags
  Next tag
End If
int stream = Bass.BASS_StreamCreateURL("", 0, 
                  BASSFlag.BASS_STREAM_STATUS, null, IntPtr.Zero);
string[] tags = Bass.BASS_ChannelGetTagsICY(stream);
if (tags == null)
  // try http...
  tags = Bass.BASS_ChannelGetTagsHTTP(stream);
if (tags != null)
  foreach (string tag in tags)
See Also