mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
massive glob of checkins: improved tests, more tests, bugfixes
This commit is contained in:
@@ -37,7 +37,7 @@ typedef enum {
|
||||
FLAC__FILE_DECODER_INVALID_CALLBACK,
|
||||
FLAC__FILE_DECODER_UNINITIALIZED
|
||||
} FLAC__FileDecoderState;
|
||||
extern const char *FLAC__FileDecoderStateString[];
|
||||
extern const char * const FLAC__FileDecoderStateString[];
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -99,7 +99,7 @@ void FLAC__file_decoder_delete(FLAC__FileDecoder *);
|
||||
*/
|
||||
FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value);
|
||||
FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value); /* 'value' may not be 0; use "-" for stdin */
|
||||
FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *buffer[], void *client_data));
|
||||
FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data));
|
||||
FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, void (*value)(const FLAC__FileDecoder *decoder, const FLAC__StreamMetaData *metadata, void *client_data));
|
||||
FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, void (*value)(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data));
|
||||
FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value);
|
||||
|
||||
@@ -84,7 +84,7 @@ extern const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */;
|
||||
typedef enum {
|
||||
FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0
|
||||
} FLAC__EntropyCodingMethodType;
|
||||
extern const char *FLAC__EntropyCodingMethodTypeString[];
|
||||
extern const char * const FLAC__EntropyCodingMethodTypeString[];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -126,7 +126,7 @@ typedef enum {
|
||||
FLAC__SUBFRAME_TYPE_FIXED = 2,
|
||||
FLAC__SUBFRAME_TYPE_LPC = 3
|
||||
} FLAC__SubframeType;
|
||||
extern const char *FLAC__SubframeTypeString[];
|
||||
extern const char * const FLAC__SubframeTypeString[];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -233,13 +233,13 @@ typedef enum {
|
||||
FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE = 2,
|
||||
FLAC__CHANNEL_ASSIGNMENT_MID_SIDE = 3
|
||||
} FLAC__ChannelAssignment;
|
||||
extern const char *FLAC__ChannelAssignmentString[];
|
||||
extern const char * const FLAC__ChannelAssignmentString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER,
|
||||
FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER
|
||||
} FLAC__FrameNumberType;
|
||||
extern const char *FLAC__FrameNumberTypeString[];
|
||||
extern const char * const FLAC__FrameNumberTypeString[];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -351,7 +351,7 @@ typedef enum {
|
||||
FLAC__METADATA_TYPE_SEEKTABLE = 3,
|
||||
FLAC__METADATA_TYPE_VORBIS_COMMENT = 4
|
||||
} FLAC__MetaDataType;
|
||||
extern const char *FLAC__MetaDataTypeString[];
|
||||
extern const char * const FLAC__MetaDataTypeString[];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/******************************************************************************
|
||||
(For an example of how all these routines are used, see the source
|
||||
code for the unit tests in src/test_unit/metadata_*.c, or metaflac
|
||||
code for the unit tests in src/test_libFLAC/metadata_*.c, or metaflac
|
||||
in src/metaflac/)
|
||||
******************************************************************************/
|
||||
|
||||
@@ -146,7 +146,7 @@ typedef enum {
|
||||
FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR,
|
||||
FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR
|
||||
} FLAC__MetaData_SimpleIteratorStatus;
|
||||
extern const char *FLAC__MetaData_SimpleIteratorStatusString[];
|
||||
extern const char * const FLAC__MetaData_SimpleIteratorStatusString[];
|
||||
|
||||
/*
|
||||
* Constructor/destructor
|
||||
@@ -335,7 +335,7 @@ typedef enum {
|
||||
FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR,
|
||||
FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR
|
||||
} FLAC__MetaData_ChainStatus;
|
||||
extern const char *FLAC__MetaData_ChainStatusString[];
|
||||
extern const char * const FLAC__MetaData_ChainStatusString[];
|
||||
|
||||
/*********** FLAC__MetaData_Chain ***********/
|
||||
|
||||
@@ -518,6 +518,8 @@ FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__MetaData_Iterator *i
|
||||
FLAC__StreamMetaData *FLAC__metadata_object_new(FLAC__MetaDataType type);
|
||||
FLAC__StreamMetaData *FLAC__metadata_object_copy(const FLAC__StreamMetaData *object);
|
||||
void FLAC__metadata_object_delete(FLAC__StreamMetaData *object);
|
||||
/* Does a deep comparison of the block data */
|
||||
FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetaData *block1, const FLAC__StreamMetaData *block2);
|
||||
|
||||
/******************************************************************
|
||||
* FLAC__StreamMetaData_Application
|
||||
|
||||
@@ -39,31 +39,31 @@ typedef enum {
|
||||
FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK,
|
||||
FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED
|
||||
} FLAC__SeekableStreamDecoderState;
|
||||
extern const char *FLAC__SeekableStreamDecoderStateString[];
|
||||
extern const char * const FLAC__SeekableStreamDecoderStateString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK,
|
||||
FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR
|
||||
} FLAC__SeekableStreamDecoderReadStatus;
|
||||
extern const char *FLAC__SeekableStreamDecoderReadStatusString[];
|
||||
extern const char * const FLAC__SeekableStreamDecoderReadStatusString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK,
|
||||
FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR
|
||||
} FLAC__SeekableStreamDecoderSeekStatus;
|
||||
extern const char *FLAC__SeekableStreamDecoderSeekStatusString[];
|
||||
extern const char * const FLAC__SeekableStreamDecoderSeekStatusString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK,
|
||||
FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR
|
||||
} FLAC__SeekableStreamDecoderTellStatus;
|
||||
extern const char *FLAC__SeekableStreamDecoderTellStatusString[];
|
||||
extern const char * const FLAC__SeekableStreamDecoderTellStatusString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK,
|
||||
FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR
|
||||
} FLAC__SeekableStreamDecoderLengthStatus;
|
||||
extern const char *FLAC__SeekableStreamDecoderLengthStatusString[];
|
||||
extern const char * const FLAC__SeekableStreamDecoderLengthStatusString[];
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -134,7 +134,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamD
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellStatus (*value)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthStatus (*value)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__bool (*value)(const FLAC__SeekableStreamDecoder *decoder, void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *buffer[], void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, void (*value)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetaData *metadata, void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, void (*value)(const FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data));
|
||||
FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value);
|
||||
|
||||
@@ -40,27 +40,27 @@ typedef enum {
|
||||
FLAC__STREAM_DECODER_INVALID_CALLBACK,
|
||||
FLAC__STREAM_DECODER_UNINITIALIZED
|
||||
} FLAC__StreamDecoderState;
|
||||
extern const char *FLAC__StreamDecoderStateString[];
|
||||
extern const char * const FLAC__StreamDecoderStateString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__STREAM_DECODER_READ_STATUS_CONTINUE,
|
||||
FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM,
|
||||
FLAC__STREAM_DECODER_READ_STATUS_ABORT
|
||||
} FLAC__StreamDecoderReadStatus;
|
||||
extern const char *FLAC__StreamDecoderReadStatusString[];
|
||||
extern const char * const FLAC__StreamDecoderReadStatusString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE,
|
||||
FLAC__STREAM_DECODER_WRITE_STATUS_ABORT
|
||||
} FLAC__StreamDecoderWriteStatus;
|
||||
extern const char *FLAC__StreamDecoderWriteStatusString[];
|
||||
extern const char * const FLAC__StreamDecoderWriteStatusString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC,
|
||||
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER,
|
||||
FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH
|
||||
} FLAC__StreamDecoderErrorStatus;
|
||||
extern const char *FLAC__StreamDecoderErrorStatusString[];
|
||||
extern const char * const FLAC__StreamDecoderErrorStatusString[];
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -121,7 +121,7 @@ void FLAC__stream_decoder_delete(FLAC__StreamDecoder *);
|
||||
@@@@ update defaults above and in documentation.html about the metadata_respond/ignore defaults
|
||||
*/
|
||||
FLAC__bool FLAC__stream_decoder_set_read_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadStatus (*value)(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data));
|
||||
FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *buffer[], void *client_data));
|
||||
FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderWriteStatus (*value)(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data));
|
||||
FLAC__bool FLAC__stream_decoder_set_metadata_callback(FLAC__StreamDecoder *decoder, void (*value)(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetaData *metadata, void *client_data));
|
||||
FLAC__bool FLAC__stream_decoder_set_error_callback(FLAC__StreamDecoder *decoder, void (*value)(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data));
|
||||
FLAC__bool FLAC__stream_decoder_set_client_data(FLAC__StreamDecoder *decoder, void *value);
|
||||
|
||||
@@ -48,13 +48,13 @@ typedef enum {
|
||||
FLAC__STREAM_ENCODER_ALREADY_INITIALIZED,
|
||||
FLAC__STREAM_ENCODER_UNINITIALIZED
|
||||
} FLAC__StreamEncoderState;
|
||||
extern const char *FLAC__StreamEncoderStateString[];
|
||||
extern const char * const FLAC__StreamEncoderStateString[];
|
||||
|
||||
typedef enum {
|
||||
FLAC__STREAM_ENCODER_WRITE_OK = 0,
|
||||
FLAC__STREAM_ENCODER_WRITE_FATAL_ERROR
|
||||
} FLAC__StreamEncoderWriteStatus;
|
||||
extern const char *FLAC__StreamEncoderWriteStatusString[];
|
||||
extern const char * const FLAC__StreamEncoderWriteStatusString[];
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -189,8 +189,8 @@ void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder);
|
||||
/*
|
||||
* Methods for encoding the data
|
||||
*/
|
||||
FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 *buf[], unsigned samples);
|
||||
FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buf[], unsigned samples);
|
||||
FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples);
|
||||
FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user