BASS.NET API for the Un4seen BASS Audio LibraryTAG_INFOUpdateFromMETA Method (IntPtr, TAGINFOEncoding, Boolean)BASS.NET API for the Un4seen BASS Audio Library
Update the tags from a meta data pointer, e.g. when streaming from a URL as triggered by a SYNCPROC using BASS_SYNC_META and as returned by BASS_ChannelGetTags(Int32, BASSTag).

Namespace: Un4seen.Bass.AddOn.Tags
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public bool UpdateFromMETA(
	IntPtr data,
	TAGINFOEncoding encoding,
	bool multiple
)

Parameters

data
Type: SystemIntPtr
The pointer to the memory block containing the meta data, e.g. as returned by BASS_ChannelGetTags(Int32, BASSTag).
encoding
Type: Un4seen.Bass.AddOn.TagsTAGINFOEncoding
Set to , if the tags are present in UTF-8 (8-bit), else set to to use ANSI characters (7-bit).
multiple
Type: SystemBoolean
Set to , if a single tag entry is further seperated by ';' (e.g. as for BASS_TAG_META) - in all other cases this should be set to .

Return Value

Type: Boolean
If any tag was updated is returned. If nothing was changed will be returned.
Remarks

The following members will be updated:
titleWith the detected new stream title, if found.

Note: For URL streams (Shoutcast, Oddcast) the 'streamtitle' might be composed within the meta data, e.g. Shoutcast combines the artist name and the real track name together. Shoutcast titles will be splitted at the first occurence of a '-' seperator.

artistWith the detected new artist, if found.

Note: For URL streams (Shoutcast, Oddcast) the 'streamtitle' might be composed within the meta data, e.g. Shoutcast combines the artist name and the real track name together. Shoutcast titles will be splitted at the first occurence of a '-' seperator.

albumWith the detected album name of the stream, if found (eg. icy-name).
genreWith the detected genre of the stream, if found (eg. icy-genre).
commentWith the detected new comment, if found (e.g. icy-url).
yearWith the detected year, if found.
bitrateWith the detected bitrate, if found (e.g. icy-br).

Note: For URL streams (Shoutcast, Oddcast), the new url location will be used.

Note: For MIDI lyric text syncs please use the UpdateFromMIDILyric(BASS_MIDI_MARK) method.

Examples

Update tags with a sync proc together with Bass.BASS_StreamCreateURL:
VB
Private _mySync As SYNCPROC
Private _tags As TAG_INFO
...
Dim url As String = "http://someurl..."
Dim stream As Integer = Bass.BASS_StreamCreateURL(url, 0, BASSFlag.BASS_STREAM_STATUS, Nothing, 0)
_tags = New TAG_INFO(url)
' set a sync to get the title updates out of the meta data...
_mySync = New SYNCPROC(AddressOf MetaSync)
Bass.BASS_ChannelSetSync(stream, BASSSync.BASS_SYNC_META, 0, _mySync, IntPtr.Zero)
...
Private Sub MetaSync(handle As Integer, channel As Integer, data As Integer, user As IntPtr)
  ' BASS_SYNC_META is triggered on meta changes of SHOUTcast streams
  _tags.UpdateFromMETA(Bass.BASS_ChannelGetTags(channel, BASSTag.BASS_TAG_META), , TAGINFOEncoding.Utf8OrLatin1, False)
End Sub
private SYNCPROC _mySync;
private TAG_INFO _tags;
...
string url = "http://someurl...";
int stream = Bass.BASS_StreamCreateURL(url, 0, BASSFlag.BASS_STREAM_STATUS, null, 0);
_tags = new TAG_INFO(url);
// set a sync to get the title updates out of the meta data...
_mySync = new SYNCPROC(MetaSync);
Bass.BASS_ChannelSetSync(stream, BASSSync.BASS_SYNC_META, 0, _mySync, IntPtr.Zero);
...
private void MetaSync(int handle, int channel, int data, IntPtr user)
{
  // BASS_SYNC_META is triggered on meta changes of SHOUTcast streams
  _tags.UpdateFromMETA( Bass.BASS_ChannelGetTags(channel, BASSTag.BASS_TAG_META), TAGINFOEncoding.Utf8OrLatin1, false );
}
See Also

Reference