BASS.NET API for the Un4seen BASS Audio LibraryBassEncBASS_Encode_CastSendMeta Method (Int32, BASSEncodeMetaDataType, Byte)BASS.NET API for the Un4seen BASS Audio Library
Sends metadata to a Shoutcast 2 server.

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

public static bool BASS_Encode_CastSendMeta(
	int handle,
	BASSEncodeMetaDataType type,
	byte[] buffer


Type: SystemInt32
The encoder handle.
Type: Un4seen.Bass.AddOn.EncBASSEncodeMetaDataType
The type of metadata (one of the BASSEncodeMetaDataType values). This is a Shoutcast 2 message class (in bits 12 to 15) and type (bits 0 to 11) that describes what the metadata is. For example, 0x4001 is class 4 and type 1 (which would indicate a station logo in PNG format).
Type: SystemByte
The metadata as an UTF-8 encoded byte array.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.

This method allows you to send an encoded UTF-8 byte array containing XML metadata to the server (SHOUTcast v2).

Some information on the available metadata options can be found in the Shoutcast 2 specs:

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThere isn't a cast set on the encoder.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also