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
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: BooleanIf any tag was updated is returned. If nothing was changed will be returned.
Remarks
title | With 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. |
artist | With 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. |
album | With the detected album name of the stream, if found (eg. icy-name). |
genre | With the detected genre of the stream, if found (eg. icy-genre). |
comment | With the detected new comment, if found (e.g. icy-url). |
year | With the detected year, if found. |
bitrate | With 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
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