mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
make typedefs for callbacks
This commit is contained in:
@@ -282,6 +282,10 @@ typedef struct {
|
||||
struct FLAC__StreamEncoderPrivate *private_; /* avoid the C++ keyword 'private' */
|
||||
} FLAC__StreamEncoder;
|
||||
|
||||
/*@@@@ document: */
|
||||
typedef FLAC__StreamEncoderWriteStatus (*FLAC__StreamEncoderWriteCallback)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data);
|
||||
typedef void (*FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -601,7 +605,7 @@ FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC_
|
||||
* \retval FLAC__bool
|
||||
* \c false if the encoder is already initialized, else \c true.
|
||||
*/
|
||||
FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteStatus (*value)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data));
|
||||
FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback value);
|
||||
|
||||
/** Set the metadata callback.
|
||||
* The supplied function will be called once at the end of encoding with
|
||||
@@ -622,7 +626,7 @@ FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder,
|
||||
* \retval FLAC__bool
|
||||
* \c false if the encoder is already initialized, else \c true.
|
||||
*/
|
||||
FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, void (*value)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data));
|
||||
FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderMetadataCallback value);
|
||||
|
||||
/** Set the client data to be passed back to callbacks.
|
||||
* This value will be supplied to callbacks in their \a client_data
|
||||
|
||||
Reference in New Issue
Block a user