BASS.NET API for the Un4seen BASS Audio Library

BassEnc_OggBASS_Encode_OGG_NewStream Method

BASS.NET API for the Un4seen BASS Audio Library
Starts a new bitstream in an Ogg Vorbis encoder's output.

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

public static bool BASS_Encode_OGG_NewStream(
	int handle,
	string options,
	BASSEncode flags
)

Parameters

handle
Type: SystemInt32
The encoder handle.
options
Type: SystemString
The new bitstream's options. The same options as with BASS_Encode_OGG_Start(Int32, String, BASSEncode, ENCODEPROC, IntPtr) and BASS_Encode_OGG_StartFile(Int32, String, BASSEncode, String) are available here.
flags
Type: Un4seen.Bass.AddOn.EncBASSEncode
A combination of these flags (see BASSEncode):
BASS_ENCODE_OGG_RESETReset all settings to defaults before processing the new options, else start with the encoder's current settings. Metadata/tag settings are always reset.
BASS_UNICODEoptions is Unicode (16-bit characters) (not needed here, since the overloads already take care of it).

Return Value

Type: Boolean
The encoder handle is returned if the encoder is successfully started, else 0 is returned (use BASS_ErrorGetCode to get the error code).
Remarks

This function ends the encoder's current bitstream and starts a new one with the specified settings. This is mainly useful for metadata changes when streaming, eg. with BASS_Encode_ServerInit. Starting a new bitstream involves writing new headers, which can be quite large (usually around 4KB), so new bitstreams should not be used too frequently to avoid excessive overhead.

Tags/comments should be in UTF-8 form. This function will take care of that when the BASS_UNICODE flag is used, but otherwise you will need to make sure that any tags included in options are UTF-8 (not ISO-8859-1/etc).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_FORMATThe channel's sample format is not supported by the encoder.
BASS_ERROR_ILLPARAMoptions contains an invalid setting.
BASS_ERROR_FILEOPENA '--picture' option file could not be opened.
BASS_ERROR_FILEFORMA '--picture' option file has an invalid format. It needs to be JPEG, PNG, or GIF.
BASS_ERROR_MEMThere is insufficient memory.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also

Reference