BASS.NET API for the Un4seen BASS Audio Library

TAG_INFOUpdateFromMETA Method (IntPtr, Boolean, 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.17.5
Syntax

public bool UpdateFromMETA(
	IntPtr data,
	bool utf8,
	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).
utf8
Type: SystemBoolean
Set to , if the tags are presented in UTF-8, else set to to use Latin-1 encoding.
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:
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), true, false );
}
See Also

Reference