BASS.NET API for the Un4seen BASS Audio Library

SHOUTcast Constructor (IBaseEncoder)

BASS.NET API for the Un4seen BASS Audio Library
Creates an instance for a SHOUTcast configuration parameter setting.

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

public SHOUTcast(
	IBaseEncoder encoder
)

Parameters

encoder
Type: Un4seen.Bass.MiscIBaseEncoder
The output encoder instance to be used.
Exceptions

ExceptionCondition
ArgumentExceptionInvalid EncoderType (only MP3 and AAC is supported)!
Remarks

An instance of this class is needed in order to create a BroadCast instance.

Please note, that you need an appropriate encoder for SHOUTcast streaming. For MP3 streaming we recommend using the latest stable version of LAME (see EncoderLAME).

When streaming in AACplus format an external encoder is needed as well, which accepts pcm data from STDIN and is able to send it's encoded data to STDOUT. As of today the only 'free' AACplus encoders comes with Winamp - you might use the 'enc_aacPlus.exe' (see EncoderWinampAACplus) or 'fhgaacenc.exe' (see EncoderFHGAACplus) with it.

Also take care of all neccessary patent and license issues when streaming or broadcasting!

Use the UseBASS property to decide, whether you want to use the BASS build-in streaming support (default) or if you want to use the BASS.NET internal implementation. The major difference is, that the BASS.NET implementation allows you to use SendData(IntPtr, Int32) manually.

Examples

Creates a SHOUTcast configuration instance.
// create an encoder instance
EncoderLAME lame = new EncoderLAME(_recHandle);
lame.LAME_Bitrate = (int)EncoderLAME.BITRATE.kbps_56;
lame.LAME_Mode = EncoderLAME.LAMEMode.Mono;
lame.LAME_TargetSampleRate = (int)EncoderLAME.SAMPLERATE.Hz_22050;
lame.LAME_Quality = EncoderLAME.LAMEQuality.Quality;

// now create the SHOUTcast instance using LAME
SHOUTcast shoutcast = new SHOUTcast(lame);
shoutcast.ServerAddress = "http://serveraddress.com";
shoutcast.ServerPort = 8000;
shoutcast.Password = "password";
...
See Also

Reference