Initialize the encoder instance to encode native FLAC files.
This flavor of initialization sets up the encoder to encode to a
plain native FLAC file. For non-stdio streams, you must use
FLAC__stream_encoder_init_stream() and provide callbacks for the I/O.
This function should be called after FLAC__stream_encoder_new() and
FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()
or FLAC__stream_encoder_process_interleaved().
initialization succeeded.
\param encoder An uninitialized encoder instance.
\param file An open file. The file should have been opened
with mode \c "w+b" and rewound. The file
becomes owned by the encoder and should not be
manipulated by the client while encoding.
Unless \a file is \c stdout, it will be closed
when FLAC__stream_encoder_finish() is called.
Note however that a proper SEEKTABLE cannot be
created when encoding to \c stdout since it is
not seekable.
\param progress_callback See FLAC__StreamEncoderProgressCallback. This
pointer may be \c NULL if the callback is not
desired.
\param client_data This value will be supplied to callbacks in their
\a client_data argument.
\assert
\code encoder != NULL \endcode
\code file != NULL \endcode
\retval FLAC__StreamEncoderInitStatus
\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;
see FLAC__StreamEncoderInitStatus for the meanings of other return values.
Initialize the encoder instance to encode native FLAC files.
This flavor of initialization sets up the encoder to encode to a plain native FLAC file. For non-stdio streams, you must use FLAC__stream_encoder_init_stream() and provide callbacks for the I/O.
This function should be called after FLAC__stream_encoder_new() and FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process() or FLAC__stream_encoder_process_interleaved(). initialization succeeded.
\param encoder An uninitialized encoder instance. \param file An open file. The file should have been opened with mode \c "w+b" and rewound. The file becomes owned by the encoder and should not be manipulated by the client while encoding. Unless \a file is \c stdout, it will be closed when FLAC__stream_encoder_finish() is called. Note however that a proper SEEKTABLE cannot be created when encoding to \c stdout since it is not seekable. \param progress_callback See FLAC__StreamEncoderProgressCallback. This pointer may be \c NULL if the callback is not desired. \param client_data This value will be supplied to callbacks in their \a client_data argument. \assert \code encoder != NULL \endcode \code file != NULL \endcode \retval FLAC__StreamEncoderInitStatus \c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values.