BASS_Encode_OGG_Start

Sets up an Ogg Vorbis encoder on a channel.

HENCODE BASS_Encode_OGG_Start(
    DWORD handle,
    char *options,
    DWORD flags,
    ENCODEPROC *proc,
    void *user
);

Parameters

handleThe channel handle... a HSTREAM, HMUSIC, or HRECORD.
optionsEncoder options... NULL = use defaults. The following OGGENC style options are supported: -b / --bitrate, -m / --min-bitrate, -M / --max-bitrate, -q / --quality, -s / --serial, -t / --title, -a / --artist, -G / --genre, -d / --date, -l / --album, -N / --tracknum, -c / --comment. See the OGGENC documentation for details on the aforementioned options and defaults. Also available is a "--picture" option that is the same as the FLAC and OPUSENC encoders option of the same name, and a "--no-reorder" option to disable reordering channels to the Vorbis specification's order. Anything else that is included will be ignored.
flagsThe flags supported by BASS_Encode_StartUser may be used here, but the floating-point conversion flags are ignored.
procOptional callback function to receive the encoded data... NULL = no callback.
userUser instance data to pass to the callback function.

Return value

The encoder handle is returned if the encoder is successfully started, else 0 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_FORMATThe channel's sample format is not supported by the encoder.
BASS_ERROR_MEMThere is insufficient memory.
BASS_ERROR_NOTAVAILThis function is not available on platforms/architectures without an FPU.
BASS_ERROR_UNKNOWNSome other mystery problem!

Remarks

BASS_Encode_StartUser is used internally to apply the encoder to the source channel, so the remarks in its documentation also apply to this function.

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).

See also

BASS_Encode_OGG_NewStream, BASS_Encode_OGG_StartFile

BASS_Encode_CastInit, BASS_Encode_IsActive, BASS_Encode_ServerInit, BASS_Encode_SetNotify, BASS_Encode_SetPaused, BASS_Encode_Stop, BASS_Encode_Write, ENCODEPROC callback, BASS_CONFIG_ENCODE_PRIORITY