Sets up a FLAC encoder on a channel.
HENCODE BASS_Encode_FLAC_Start( DWORD handle, char *options, DWORD flags, ENCODEPROCEX *proc, void *user );
handle | The channel handle... a HSTREAM, HMUSIC, or HRECORD. |
options | Encoder options... NULL = use defaults. The following reference FLAC encoder style options are supported: --ogg, --serial-number, --until, -S / --seekpoint, --no-seektable, -T / --tag, --picture, -P / --padding, --no-padding, -b / --blocksize, -V / --verify, --limit-min-bitrate, --fast, --best, -0 / --compression-level-0 and the other compression level options. See the FLAC documentation for details on the aforementioned options and defaults. Anything else that is included will be ignored. |
flags | The flags supported by BASS_Encode_StartUser may be used here. FLAC does not support floating-point sample data, so that must be converted to integer before it is fed to the encoder. If none of the floating-point conversion flags are specified, then one will be applied automatically based on the channel's origres value (available from BASS_ChannelGetInfo) or BASS_ENCODE_FP_16BIT if that is undefined. |
proc | Optional callback function to receive the encoded data... NULL = no callback. |
user | User instance data to pass to the callback function. |
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_FORMAT | The channel's sample format is not supported by the encoder. |
BASS_ERROR_ILLPARAM | options contains an invalid setting. |
BASS_ERROR_FILEOPEN | A "--picture" option file could not be opened. |
BASS_ERROR_FILEFORM | A "--picture" option file has an invalid format. It needs to be JPEG, PNG, or GIF. |
BASS_ERROR_MEM | There is insufficient memory. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
The evenly spaced seekpoint options (with a "x" or "s" suffix), including the 10s default spacing, are only applicable when the "--until" option is used to tell how long the encoding will be. "--until=-0" can be used for the full length of the source channel, according to BASS_ChannelGetLength.
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).
BASS_Encode_CastInit, BASS_Encode_IsActive, BASS_Encode_ServerInit, BASS_Encode_SetNotify, BASS_Encode_SetPaused, BASS_Encode_Stop, BASS_Encode_Write, ENCODEPROCEX callback, BASS_CONFIG_ENCODE_PRIORITY