BASS_Encode_OPUS_StartFile
Sets up an Opus encoder on a channel, writing the output to a file.
HENCODE BASS_Encode_OPUS_StartFile(
DWORD handle,
char *options,
DWORD flags,
char *filename
);
Parameters
| handle | The channel handle... a HSTREAM, HMUSIC, or HRECORD. | ||||||||||||
| options | Encoder options... NULL = use defaults. The following OPUSENC style options are supported: --bitrate, --vbr, --cvbr, --hard-cbr, --comp / --complexity, --framesize, --expect-loss, --max-delay, --serial, --comment, --artist, --title, --album, --date, --genre, --padding. Anything else that is included will be ignored. See the OPUSENC documentation for details on the aforementioned options and defaults. | ||||||||||||
| flags | A combination of these flags.
| ||||||||||||
| filename | Output filename... NULL = no output file. |
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_HANDLE | handle is not valid. |
| BASS_ERROR_FORMAT | The channel's sample format is not supported by the encoder. |
| BASS_ERROR_CREATE | The file could not be created. |
| BASS_ERROR_UNKNOWN | Some 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).
Platform-specific
On Windows and Linux, an SSE supporting CPU is required for sample rates other than 48000/24000/16000/12000/8000 Hz.See also
BASS_Encode_OPUS_StartBASS_Encode_IsActive, BASS_Encode_SetNotify, BASS_Encode_SetPaused, BASS_Encode_Stop, BASS_Encode_Write, BASS_CONFIG_ENCODE_PRIORITY