diff --git a/src/libFLAC++/metadata.cpp b/src/libFLAC++/metadata.cpp index a5023a5c..36c79a34 100644 --- a/src/libFLAC++/metadata.cpp +++ b/src/libFLAC++/metadata.cpp @@ -57,7 +57,7 @@ namespace FLAC { }; - Prototype *clone(const Prototype *object) + FLACPP_API Prototype *clone(const Prototype *object) { FLAC__ASSERT(0 != object); @@ -745,7 +745,7 @@ namespace FLAC { // // ============================================================ - bool get_streaminfo(const char *filename, StreamInfo &streaminfo) + FLACPP_API bool get_streaminfo(const char *filename, StreamInfo &streaminfo) { FLAC__ASSERT(0 != filename); diff --git a/src/libFLAC/file_decoder.c b/src/libFLAC/file_decoder.c index e80dec44..5f1def99 100644 --- a/src/libFLAC/file_decoder.c +++ b/src/libFLAC/file_decoder.c @@ -72,7 +72,7 @@ typedef struct FLAC__FileDecoderPrivate { * ***********************************************************************/ -const char * const FLAC__FileDecoderStateString[] = { +FLAC_API const char * const FLAC__FileDecoderStateString[] = { "FLAC__FILE_DECODER_OK", "FLAC__FILE_DECODER_END_OF_FILE", "FLAC__FILE_DECODER_ERROR_OPENING_FILE", @@ -90,7 +90,7 @@ const char * const FLAC__FileDecoderStateString[] = { * ***********************************************************************/ -FLAC__FileDecoder *FLAC__file_decoder_new() +FLAC_API FLAC__FileDecoder *FLAC__file_decoder_new() { FLAC__FileDecoder *decoder; @@ -134,7 +134,7 @@ FLAC__FileDecoder *FLAC__file_decoder_new() return decoder; } -void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) +FLAC_API void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -156,7 +156,7 @@ void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) * ***********************************************************************/ -FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) +FLAC_API FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -190,7 +190,7 @@ FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) return decoder->protected_->state = FLAC__FILE_DECODER_OK; } -FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -216,7 +216,7 @@ FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) return FLAC__seekable_stream_decoder_finish(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -227,7 +227,7 @@ FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC_ return FLAC__seekable_stream_decoder_set_md5_checking(decoder->private_->seekable_stream_decoder, value); } -FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value) +FLAC_API FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -249,7 +249,7 @@ FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const cha return true; } -FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderWriteCallback value) +FLAC_API FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -260,7 +260,7 @@ FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLA return true; } -FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderMetadataCallback value) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -271,7 +271,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, return true; } -FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderErrorCallback value) +FLAC_API FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -282,7 +282,7 @@ FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLA return true; } -FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value) +FLAC_API FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -293,7 +293,7 @@ FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void * return true; } -FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -304,7 +304,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, F return FLAC__seekable_stream_decoder_set_metadata_respond(decoder->private_->seekable_stream_decoder, type); } -FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -315,7 +315,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder return FLAC__seekable_stream_decoder_set_metadata_respond_application(decoder->private_->seekable_stream_decoder, id); } -FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -326,7 +326,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decode return FLAC__seekable_stream_decoder_set_metadata_respond_all(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -337,7 +337,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FL return FLAC__seekable_stream_decoder_set_metadata_ignore(decoder->private_->seekable_stream_decoder, type); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -348,7 +348,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder return FLAC__seekable_stream_decoder_set_metadata_ignore_application(decoder->private_->seekable_stream_decoder, id); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -359,71 +359,70 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder return FLAC__seekable_stream_decoder_set_metadata_ignore_all(decoder->private_->seekable_stream_decoder); } - -FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder) +FLAC_API FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_state(const FLAC__FileDecoder *decoder) +FLAC_API FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_state(decoder->private_->seekable_stream_decoder); } -FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder) +FLAC_API FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_stream_decoder_state(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_md5_checking(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder) +FLAC_API unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_channels(decoder->private_->seekable_stream_decoder); } -FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__FileDecoder *decoder) +FLAC_API FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_channel_assignment(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder) +FLAC_API unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_bits_per_sample(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder) +FLAC_API unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_sample_rate(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder) +FLAC_API unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_blocksize(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -443,7 +442,7 @@ FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) return ret; } -FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -463,7 +462,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *d return ret; } -FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decoder) +FLAC_API FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -483,7 +482,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decod return ret; } -FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample) +FLAC_API FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(decoder->protected_->state == FLAC__FILE_DECODER_OK || decoder->protected_->state == FLAC__FILE_DECODER_END_OF_FILE); diff --git a/src/libFLAC/file_encoder.c b/src/libFLAC/file_encoder.c index cd570b0d..c1741cd9 100644 --- a/src/libFLAC/file_encoder.c +++ b/src/libFLAC/file_encoder.c @@ -62,7 +62,7 @@ typedef struct FLAC__FileEncoderPrivate { * ***********************************************************************/ -const char * const FLAC__FileEncoderStateString[] = { +FLAC_API const char * const FLAC__FileEncoderStateString[] = { "FLAC__FILE_ENCODER_OK", "FLAC__FILE_ENCODER_NO_FILENAME", "FLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR", @@ -80,7 +80,7 @@ const char * const FLAC__FileEncoderStateString[] = { * ***********************************************************************/ -FLAC__FileEncoder *FLAC__file_encoder_new() +FLAC_API FLAC__FileEncoder *FLAC__file_encoder_new() { FLAC__FileEncoder *encoder; @@ -124,7 +124,7 @@ FLAC__FileEncoder *FLAC__file_encoder_new() return encoder; } -void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder) +FLAC_API void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->protected_); @@ -146,7 +146,7 @@ void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder) * ***********************************************************************/ -FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder) +FLAC_API FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); @@ -181,7 +181,7 @@ FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder) return encoder->protected_->state = FLAC__FILE_ENCODER_OK; } -void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder) +FLAC_API void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); @@ -209,7 +209,7 @@ void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder) encoder->protected_->state = FLAC__FILE_ENCODER_UNINITIALIZED; } -FLAC__bool FLAC__file_encoder_set_verify(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_verify(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -220,7 +220,7 @@ FLAC__bool FLAC__file_encoder_set_verify(FLAC__FileEncoder *encoder, FLAC__bool return FLAC__seekable_stream_encoder_set_verify(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_streamable_subset(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_streamable_subset(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -231,7 +231,7 @@ FLAC__bool FLAC__file_encoder_set_streamable_subset(FLAC__FileEncoder *encoder, return FLAC__seekable_stream_encoder_set_streamable_subset(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_do_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_do_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -242,7 +242,7 @@ FLAC__bool FLAC__file_encoder_set_do_mid_side_stereo(FLAC__FileEncoder *encoder, return FLAC__seekable_stream_encoder_set_do_mid_side_stereo(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_loose_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_loose_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -253,7 +253,7 @@ FLAC__bool FLAC__file_encoder_set_loose_mid_side_stereo(FLAC__FileEncoder *encod return FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_channels(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_channels(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -264,7 +264,7 @@ FLAC__bool FLAC__file_encoder_set_channels(FLAC__FileEncoder *encoder, unsigned return FLAC__seekable_stream_encoder_set_channels(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_bits_per_sample(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_bits_per_sample(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -275,7 +275,7 @@ FLAC__bool FLAC__file_encoder_set_bits_per_sample(FLAC__FileEncoder *encoder, un return FLAC__seekable_stream_encoder_set_bits_per_sample(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_sample_rate(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_sample_rate(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -286,7 +286,7 @@ FLAC__bool FLAC__file_encoder_set_sample_rate(FLAC__FileEncoder *encoder, unsign return FLAC__seekable_stream_encoder_set_sample_rate(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_blocksize(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_blocksize(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -297,7 +297,7 @@ FLAC__bool FLAC__file_encoder_set_blocksize(FLAC__FileEncoder *encoder, unsigned return FLAC__seekable_stream_encoder_set_blocksize(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_max_lpc_order(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_max_lpc_order(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -308,7 +308,7 @@ FLAC__bool FLAC__file_encoder_set_max_lpc_order(FLAC__FileEncoder *encoder, unsi return FLAC__seekable_stream_encoder_set_max_lpc_order(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_qlp_coeff_precision(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_qlp_coeff_precision(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -319,7 +319,7 @@ FLAC__bool FLAC__file_encoder_set_qlp_coeff_precision(FLAC__FileEncoder *encoder return FLAC__seekable_stream_encoder_set_qlp_coeff_precision(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_do_qlp_coeff_prec_search(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_do_qlp_coeff_prec_search(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -330,7 +330,7 @@ FLAC__bool FLAC__file_encoder_set_do_qlp_coeff_prec_search(FLAC__FileEncoder *en return FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_do_escape_coding(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_do_escape_coding(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -341,7 +341,7 @@ FLAC__bool FLAC__file_encoder_set_do_escape_coding(FLAC__FileEncoder *encoder, F return FLAC__seekable_stream_encoder_set_do_escape_coding(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_do_exhaustive_model_search(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_set_do_exhaustive_model_search(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -352,7 +352,7 @@ FLAC__bool FLAC__file_encoder_set_do_exhaustive_model_search(FLAC__FileEncoder * return FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_min_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_min_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -363,7 +363,7 @@ FLAC__bool FLAC__file_encoder_set_min_residual_partition_order(FLAC__FileEncoder return FLAC__seekable_stream_encoder_set_min_residual_partition_order(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_max_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_max_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -374,7 +374,7 @@ FLAC__bool FLAC__file_encoder_set_max_residual_partition_order(FLAC__FileEncoder return FLAC__seekable_stream_encoder_set_max_residual_partition_order(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_rice_parameter_search_dist(FLAC__FileEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__file_encoder_set_rice_parameter_search_dist(FLAC__FileEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -385,7 +385,7 @@ FLAC__bool FLAC__file_encoder_set_rice_parameter_search_dist(FLAC__FileEncoder * return FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_total_samples_estimate(FLAC__FileEncoder *encoder, FLAC__uint64 value) +FLAC_API FLAC__bool FLAC__file_encoder_set_total_samples_estimate(FLAC__FileEncoder *encoder, FLAC__uint64 value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -396,7 +396,7 @@ FLAC__bool FLAC__file_encoder_set_total_samples_estimate(FLAC__FileEncoder *enco return FLAC__seekable_stream_encoder_set_total_samples_estimate(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_set_metadata(FLAC__FileEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) +FLAC_API FLAC__bool FLAC__file_encoder_set_metadata(FLAC__FileEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -407,7 +407,7 @@ FLAC__bool FLAC__file_encoder_set_metadata(FLAC__FileEncoder *encoder, FLAC__Str return FLAC__seekable_stream_encoder_set_metadata(encoder->private_->seekable_stream_encoder, metadata, num_blocks); } -FLAC__bool FLAC__file_encoder_set_filename(FLAC__FileEncoder *encoder, const char *value) +FLAC_API FLAC__bool FLAC__file_encoder_set_filename(FLAC__FileEncoder *encoder, const char *value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -427,7 +427,7 @@ FLAC__bool FLAC__file_encoder_set_filename(FLAC__FileEncoder *encoder, const cha return true; } -FLAC__bool FLAC__file_encoder_set_progress_callback(FLAC__FileEncoder *encoder, FLAC__FileEncoderProgressCallback value) +FLAC_API FLAC__bool FLAC__file_encoder_set_progress_callback(FLAC__FileEncoder *encoder, FLAC__FileEncoderProgressCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -438,7 +438,7 @@ FLAC__bool FLAC__file_encoder_set_progress_callback(FLAC__FileEncoder *encoder, return true; } -FLAC__bool FLAC__file_encoder_set_client_data(FLAC__FileEncoder *encoder, void *value) +FLAC_API FLAC__bool FLAC__file_encoder_set_client_data(FLAC__FileEncoder *encoder, void *value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -453,7 +453,7 @@ FLAC__bool FLAC__file_encoder_set_client_data(FLAC__FileEncoder *encoder, void * * These three functions are not static, but not publically exposed in * include/FLAC/ either. They are used by the test suite. */ -FLAC__bool FLAC__file_encoder_disable_constant_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_disable_constant_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -463,7 +463,7 @@ FLAC__bool FLAC__file_encoder_disable_constant_subframes(FLAC__FileEncoder *enco return FLAC__seekable_stream_encoder_disable_constant_subframes(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_disable_fixed_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_disable_fixed_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -473,7 +473,7 @@ FLAC__bool FLAC__file_encoder_disable_fixed_subframes(FLAC__FileEncoder *encoder return FLAC__seekable_stream_encoder_disable_fixed_subframes(encoder->private_->seekable_stream_encoder, value); } -FLAC__bool FLAC__file_encoder_disable_verbatim_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__file_encoder_disable_verbatim_subframes(FLAC__FileEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -483,161 +483,161 @@ FLAC__bool FLAC__file_encoder_disable_verbatim_subframes(FLAC__FileEncoder *enco return FLAC__seekable_stream_encoder_disable_verbatim_subframes(encoder->private_->seekable_stream_encoder, value); } -FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->protected_); return encoder->protected_->state; } -FLAC__SeekableStreamEncoderState FLAC__file_encoder_get_seekable_stream_encoder_state(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__SeekableStreamEncoderState FLAC__file_encoder_get_seekable_stream_encoder_state(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_state(encoder->private_->seekable_stream_encoder); } -FLAC__StreamEncoderState FLAC__file_encoder_get_stream_encoder_state(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__StreamEncoderState FLAC__file_encoder_get_stream_encoder_state(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_stream_encoder_state(encoder->private_->seekable_stream_encoder); } -FLAC__StreamDecoderState FLAC__file_encoder_get_verify_decoder_state(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__StreamDecoderState FLAC__file_encoder_get_verify_decoder_state(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_verify_decoder_state(encoder->private_->seekable_stream_encoder); } -void FLAC__file_encoder_get_verify_decoder_error_stats(const FLAC__FileEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) +FLAC_API void FLAC__file_encoder_get_verify_decoder_error_stats(const FLAC__FileEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(encoder->private_->seekable_stream_encoder, absolute_sample, frame_number, channel, sample, expected, got); } -FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_verify(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_streamable_subset(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_streamable_subset(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_streamable_subset(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_do_mid_side_stereo(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_do_mid_side_stereo(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_do_mid_side_stereo(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_loose_mid_side_stereo(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_loose_mid_side_stereo(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_channels(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_bits_per_sample(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_bits_per_sample(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_bits_per_sample(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_sample_rate(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_blocksize(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_max_lpc_order(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_max_lpc_order(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_max_lpc_order(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_qlp_coeff_precision(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_qlp_coeff_precision(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_qlp_coeff_precision(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_do_qlp_coeff_prec_search(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_do_qlp_coeff_prec_search(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_do_escape_coding(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_do_escape_coding(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_do_escape_coding(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_get_do_exhaustive_model_search(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__bool FLAC__file_encoder_get_do_exhaustive_model_search(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_min_residual_partition_order(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_min_residual_partition_order(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_min_residual_partition_order(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_max_residual_partition_order(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_max_residual_partition_order(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_max_residual_partition_order(encoder->private_->seekable_stream_encoder); } -unsigned FLAC__file_encoder_get_rice_parameter_search_dist(const FLAC__FileEncoder *encoder) +FLAC_API unsigned FLAC__file_encoder_get_rice_parameter_search_dist(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(encoder->private_->seekable_stream_encoder); } -FLAC__uint64 FLAC__file_encoder_get_total_samples_estimate(const FLAC__FileEncoder *encoder) +FLAC_API FLAC__uint64 FLAC__file_encoder_get_total_samples_estimate(const FLAC__FileEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__seekable_stream_encoder_get_total_samples_estimate(encoder->private_->seekable_stream_encoder); } -FLAC__bool FLAC__file_encoder_process(FLAC__FileEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__file_encoder_process(FLAC__FileEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -650,7 +650,7 @@ FLAC__bool FLAC__file_encoder_process(FLAC__FileEncoder *encoder, const FLAC__in } /* 'samples' is channel-wide samples, e.g. for 1 second at 44100Hz, 'samples' = 44100 regardless of the number of channels */ -FLAC__bool FLAC__file_encoder_process_interleaved(FLAC__FileEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__file_encoder_process_interleaved(FLAC__FileEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); diff --git a/src/libFLAC/format.c b/src/libFLAC/format.c index c646247a..c56334c7 100644 --- a/src/libFLAC/format.c +++ b/src/libFLAC/format.c @@ -33,99 +33,99 @@ #define min(a,b) ((a)<(b)?(a):(b)) /* VERSION should come from configure */ -const char *FLAC__VERSION_STRING = VERSION; +FLAC_API const char *FLAC__VERSION_STRING = VERSION; #if defined _MSC_VER || defined __MINW32__ /* yet one more hack because of MSVC6: */ -const char *FLAC__VENDOR_STRING = "reference libFLAC 1.0.4 20020924"; +FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC 1.0.4 20020924"; #else -const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION " 20020924"; +FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION " 20020924"; #endif -const FLAC__byte FLAC__STREAM_SYNC_STRING[4] = { 'f','L','a','C' }; -const unsigned FLAC__STREAM_SYNC = 0x664C6143; -const unsigned FLAC__STREAM_SYNC_LEN = 32; /* bits */; +FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4] = { 'f','L','a','C' }; +FLAC_API const unsigned FLAC__STREAM_SYNC = 0x664C6143; +FLAC_API const unsigned FLAC__STREAM_SYNC_LEN = 32; /* bits */; -const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = 16; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = 16; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = 24; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = 24; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = 20; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = 3; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = 5; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = 36; /* bits */ -const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN = 128; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = 16; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = 16; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = 24; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = 24; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = 20; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = 3; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = 5; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = 36; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN = 128; /* bits */ -const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN = 32; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN = 32; /* bits */ -const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = 64; /* bits */ -const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = 64; /* bits */ -const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = 16; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = 64; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = 64; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = 16; /* bits */ -const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER = 0xffffffffffffffff; +FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER = 0xffffffffffffffff; -const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN = 32; /* bits */ -const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN = 32; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN = 32; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN = 32; /* bits */ -const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN = 1; /* bits */ -const unsigned FLAC__STREAM_METADATA_TYPE_LEN = 7; /* bits */ -const unsigned FLAC__STREAM_METADATA_LENGTH_LEN = 24; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN = 1; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_TYPE_LEN = 7; /* bits */ +FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN = 24; /* bits */ -const unsigned FLAC__FRAME_HEADER_SYNC = 0x3ffe; -const unsigned FLAC__FRAME_HEADER_SYNC_LEN = 14; /* bits */ -const unsigned FLAC__FRAME_HEADER_RESERVED_LEN = 2; /* bits */ -const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN = 4; /* bits */ -const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN = 4; /* bits */ -const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN = 4; /* bits */ -const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN = 3; /* bits */ -const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN = 1; /* bits */ -const unsigned FLAC__FRAME_HEADER_CRC_LEN = 8; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC = 0x3ffe; +FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC_LEN = 14; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_RESERVED_LEN = 2; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN = 4; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN = 4; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN = 4; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN = 3; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN = 1; /* bits */ +FLAC_API const unsigned FLAC__FRAME_HEADER_CRC_LEN = 8; /* bits */ -const unsigned FLAC__FRAME_FOOTER_CRC_LEN = 16; /* bits */ +FLAC_API const unsigned FLAC__FRAME_FOOTER_CRC_LEN = 16; /* bits */ -const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN = 2; /* bits */ -const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN = 4; /* bits */ -const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN = 4; /* bits */ -const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN = 5; /* bits */ +FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN = 2; /* bits */ +FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN = 4; /* bits */ +FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN = 4; /* bits */ +FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN = 5; /* bits */ -const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER = 15; /* == (1<file); @@ -393,7 +393,7 @@ FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_Simpl return iterator->is_writable; } -FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator) +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != iterator->file); @@ -411,7 +411,7 @@ FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *it return read_metadata_block_header_(iterator); } -FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator) +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator) { long this_offset; @@ -445,7 +445,7 @@ FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *it return true; } -FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Metadata_SimpleIterator *iterator) +FLAC_API FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Metadata_SimpleIterator *iterator) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != iterator->file); @@ -453,7 +453,7 @@ FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Met return iterator->type; } -FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_SimpleIterator *iterator) +FLAC_API FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_SimpleIterator *iterator) { FLAC__StreamMetadata *block = FLAC__metadata_object_new(iterator->type); @@ -482,7 +482,7 @@ FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_Si return block; } -FLAC__bool FLAC__metadata_simple_iterator_set_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding) +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_set_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding) { FLAC__ASSERT_DECLARATION(long debug_target_offset = iterator->offset[iterator->depth];) FLAC__bool ret; @@ -580,7 +580,7 @@ FLAC__bool FLAC__metadata_simple_iterator_set_block(FLAC__Metadata_SimpleIterato } } -FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding) +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Metadata_SimpleIterator *iterator, FLAC__StreamMetadata *block, FLAC__bool use_padding) { unsigned padding_leftover = 0; FLAC__bool padding_is_last = false; @@ -659,7 +659,7 @@ FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Metadata_Simp } } -FLAC__bool FLAC__metadata_simple_iterator_delete_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__bool use_padding) +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_delete_block(FLAC__Metadata_SimpleIterator *iterator, FLAC__bool use_padding) { FLAC__ASSERT_DECLARATION(long debug_target_offset = iterator->offset[iterator->depth];) FLAC__bool ret; @@ -729,7 +729,7 @@ struct FLAC__Metadata_Iterator { FLAC__Metadata_Node *current; }; -const char * const FLAC__Metadata_ChainStatusString[] = { +FLAC_API const char * const FLAC__Metadata_ChainStatusString[] = { "FLAC__METADATA_CHAIN_STATUS_OK", "FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT", "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE", @@ -886,7 +886,7 @@ static FLAC__bool chain_merge_adjacent_padding_(FLAC__Metadata_Chain *chain, FLA return false; } -FLAC__Metadata_Chain *FLAC__metadata_chain_new() +FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new() { FLAC__Metadata_Chain *chain = malloc(sizeof(FLAC__Metadata_Chain)); @@ -901,7 +901,7 @@ FLAC__Metadata_Chain *FLAC__metadata_chain_new() return chain; } -void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain) +FLAC_API void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain) { FLAC__Metadata_Node *node, *next; @@ -919,7 +919,7 @@ void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain) free(chain); } -FLAC__Metadata_ChainStatus FLAC__metadata_chain_status(FLAC__Metadata_Chain *chain) +FLAC_API FLAC__Metadata_ChainStatus FLAC__metadata_chain_status(FLAC__Metadata_Chain *chain) { FLAC__Metadata_ChainStatus status; @@ -930,7 +930,7 @@ FLAC__Metadata_ChainStatus FLAC__metadata_chain_status(FLAC__Metadata_Chain *cha return status; } -FLAC__bool FLAC__metadata_chain_read(FLAC__Metadata_Chain *chain, const char *filename) +FLAC_API FLAC__bool FLAC__metadata_chain_read(FLAC__Metadata_Chain *chain, const char *filename) { FLAC__Metadata_SimpleIterator *iterator; FLAC__Metadata_Node *node; @@ -982,7 +982,7 @@ FLAC__bool FLAC__metadata_chain_read(FLAC__Metadata_Chain *chain, const char *fi return true; } -FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__bool preserve_file_stats) +FLAC_API FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool use_padding, FLAC__bool preserve_file_stats) { struct stat stats; const char *tempfile_path_prefix = 0; @@ -1061,7 +1061,7 @@ FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool us return true; } -void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain) +FLAC_API void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain) { FLAC__Metadata_Node *node; @@ -1073,7 +1073,7 @@ void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain) } } -void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain) +FLAC_API void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain) { FLAC__Metadata_Node *node, *save; unsigned i; @@ -1100,7 +1100,7 @@ void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain) } -FLAC__Metadata_Iterator *FLAC__metadata_iterator_new() +FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new() { FLAC__Metadata_Iterator *iterator = malloc(sizeof(FLAC__Metadata_Iterator)); @@ -1112,14 +1112,14 @@ FLAC__Metadata_Iterator *FLAC__metadata_iterator_new() return iterator; } -void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator) +FLAC_API void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator) { FLAC__ASSERT(0 != iterator); free(iterator); } -void FLAC__metadata_iterator_init(FLAC__Metadata_Iterator *iterator, FLAC__Metadata_Chain *chain) +FLAC_API void FLAC__metadata_iterator_init(FLAC__Metadata_Iterator *iterator, FLAC__Metadata_Chain *chain) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != chain); @@ -1129,7 +1129,7 @@ void FLAC__metadata_iterator_init(FLAC__Metadata_Iterator *iterator, FLAC__Metad iterator->current = chain->head; } -FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator) +FLAC_API FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator) { FLAC__ASSERT(0 != iterator); @@ -1140,7 +1140,7 @@ FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator) return true; } -FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator) +FLAC_API FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator) { FLAC__ASSERT(0 != iterator); @@ -1151,7 +1151,7 @@ FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator) return true; } -FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__Metadata_Iterator *iterator) +FLAC_API FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__Metadata_Iterator *iterator) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != iterator->current); @@ -1160,7 +1160,7 @@ FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__Metadata_I return iterator->current->data->type; } -FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator *iterator) +FLAC_API FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator *iterator) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != iterator->current); @@ -1168,14 +1168,14 @@ FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator return iterator->current->data; } -FLAC__bool FLAC__metadata_iterator_set_block(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) +FLAC_API FLAC__bool FLAC__metadata_iterator_set_block(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != block); return FLAC__metadata_iterator_delete_block(iterator, false) && FLAC__metadata_iterator_insert_block_after(iterator, block); } -FLAC__bool FLAC__metadata_iterator_delete_block(FLAC__Metadata_Iterator *iterator, FLAC__bool replace_with_padding) +FLAC_API FLAC__bool FLAC__metadata_iterator_delete_block(FLAC__Metadata_Iterator *iterator, FLAC__bool replace_with_padding) { FLAC__Metadata_Node *save; @@ -1201,7 +1201,7 @@ FLAC__bool FLAC__metadata_iterator_delete_block(FLAC__Metadata_Iterator *iterato return true; } -FLAC__bool FLAC__metadata_iterator_insert_block_before(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) +FLAC_API FLAC__bool FLAC__metadata_iterator_insert_block_before(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) { FLAC__Metadata_Node *node; @@ -1226,7 +1226,7 @@ FLAC__bool FLAC__metadata_iterator_insert_block_before(FLAC__Metadata_Iterator * return true; } -FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) +FLAC_API FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) { FLAC__Metadata_Node *node; diff --git a/src/libFLAC/metadata_object.c b/src/libFLAC/metadata_object.c index 0f822b09..2630648f 100644 --- a/src/libFLAC/metadata_object.c +++ b/src/libFLAC/metadata_object.c @@ -202,7 +202,7 @@ static FLAC__bool vorbiscomment_set_entry_(FLAC__StreamMetadata *object, FLAC__S * ***************************************************************************/ -FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type) +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type) { FLAC__StreamMetadata *object = malloc(sizeof(FLAC__StreamMetadata)); if(0 != object) { @@ -234,7 +234,7 @@ FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type) return object; } -FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object) +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object) { FLAC__StreamMetadata *to; @@ -323,7 +323,7 @@ void FLAC__metadata_object_delete_data(FLAC__StreamMetadata *object) } } -void FLAC__metadata_object_delete(FLAC__StreamMetadata *object) +FLAC_API void FLAC__metadata_object_delete(FLAC__StreamMetadata *object) { FLAC__metadata_object_delete_data(object); free(object); @@ -419,7 +419,7 @@ static FLAC__bool compare_block_data_vorbiscomment_(const FLAC__StreamMetadata_V return true; } -FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, const FLAC__StreamMetadata *block2) +FLAC_API FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, const FLAC__StreamMetadata *block2) { FLAC__ASSERT(0 != block1); FLAC__ASSERT(0 != block2); @@ -450,7 +450,7 @@ FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, co } } -FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *object, FLAC__byte *data, unsigned length, FLAC__bool copy) +FLAC_API FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *object, FLAC__byte *data, unsigned length, FLAC__bool copy) { FLAC__byte *save; @@ -476,7 +476,7 @@ FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *obje return true; } -FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *object, unsigned new_num_points) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *object, unsigned new_num_points) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -518,7 +518,7 @@ FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *o return true; } -void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point) +FLAC_API void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -527,7 +527,7 @@ void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, uns object->data.seek_table.points[point_num] = point; } -FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point) { int i; @@ -547,7 +547,7 @@ FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *ob return true; } -FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *object, unsigned point_num) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *object, unsigned point_num) { unsigned i; @@ -562,7 +562,7 @@ FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *ob return FLAC__metadata_object_seektable_resize_points(object, object->data.seek_table.num_points-1); } -FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata *object) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata *object) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -570,7 +570,7 @@ FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata * return FLAC__format_seektable_is_legal(&object->data.seek_table); } -FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__StreamMetadata *object, unsigned num) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__StreamMetadata *object, unsigned num) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -582,7 +582,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__St return true; } -FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMetadata *object, FLAC__uint64 sample_number) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMetadata *object, FLAC__uint64 sample_number) { FLAC__StreamMetadata_SeekTable *seek_table; @@ -601,7 +601,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMet return true; } -FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMetadata *object, FLAC__uint64 sample_numbers[], unsigned num) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMetadata *object, FLAC__uint64 sample_numbers[], unsigned num) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -626,7 +626,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMe return true; } -FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__StreamMetadata *object, unsigned num, FLAC__uint64 total_samples) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__StreamMetadata *object, unsigned num, FLAC__uint64 total_samples) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); @@ -651,7 +651,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__S return true; } -FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *object, FLAC__bool compact) +FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *object, FLAC__bool compact) { unsigned unique; @@ -663,12 +663,12 @@ FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *o return !compact || FLAC__metadata_object_seektable_resize_points(object, unique); } -FLAC__bool FLAC__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) { return vorbiscomment_set_entry_(object, &object->data.vorbis_comment.vendor_string, &entry, copy); } -FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetadata *object, unsigned new_num_comments) +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetadata *object, unsigned new_num_comments) { FLAC__ASSERT(0 != object); FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); @@ -712,12 +712,12 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetad return true; } -FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) { return vorbiscomment_set_entry_(object, &object->data.vorbis_comment.comments[comment_num], &entry, copy); } -FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy) { FLAC__StreamMetadata_VorbisComment *vc; @@ -738,7 +738,7 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetada return FLAC__metadata_object_vorbiscomment_set_comment(object, comment_num, entry, copy); } -FLAC__bool FLAC__metadata_object_vorbiscomment_delete_comment(FLAC__StreamMetadata *object, unsigned comment_num) +FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_delete_comment(FLAC__StreamMetadata *object, unsigned comment_num) { FLAC__StreamMetadata_VorbisComment *vc; diff --git a/src/libFLAC/seekable_stream_decoder.c b/src/libFLAC/seekable_stream_decoder.c index 79bccfb9..1bef1ce8 100644 --- a/src/libFLAC/seekable_stream_decoder.c +++ b/src/libFLAC/seekable_stream_decoder.c @@ -75,7 +75,7 @@ typedef struct FLAC__SeekableStreamDecoderPrivate { * ***********************************************************************/ -const char * const FLAC__SeekableStreamDecoderStateString[] = { +FLAC_API const char * const FLAC__SeekableStreamDecoderStateString[] = { "FLAC__SEEKABLE_STREAM_DECODER_OK", "FLAC__SEEKABLE_STREAM_DECODER_SEEKING", "FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM", @@ -88,22 +88,22 @@ const char * const FLAC__SeekableStreamDecoderStateString[] = { "FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED" }; -const char * const FLAC__SeekableStreamDecoderReadStatusString[] = { +FLAC_API const char * const FLAC__SeekableStreamDecoderReadStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderSeekStatusString[] = { +FLAC_API const char * const FLAC__SeekableStreamDecoderSeekStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderTellStatusString[] = { +FLAC_API const char * const FLAC__SeekableStreamDecoderTellStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { +FLAC_API const char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR" }; @@ -115,7 +115,7 @@ const char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { * ***********************************************************************/ -FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() +FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() { FLAC__SeekableStreamDecoder *decoder; @@ -157,7 +157,7 @@ FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() return decoder; } -void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) +FLAC_API void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -179,7 +179,7 @@ void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) * ***********************************************************************/ -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -223,7 +223,7 @@ FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__Seekab return decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_OK; } -FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool md5_failed = false; @@ -255,7 +255,7 @@ FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *dec return !md5_failed; } -FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -265,7 +265,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDe return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -276,7 +276,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -287,7 +287,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -298,7 +298,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -309,7 +309,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStrea return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -320,7 +320,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDe return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -331,7 +331,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStream return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -342,7 +342,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStr return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -353,7 +353,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStream return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -364,7 +364,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDec return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -379,7 +379,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStre return FLAC__stream_decoder_set_metadata_respond(decoder->private_->stream_decoder, type); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -390,7 +390,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__ return FLAC__stream_decoder_set_metadata_respond_application(decoder->private_->stream_decoder, id); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -403,7 +403,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__Seekable return FLAC__stream_decoder_set_metadata_respond_all(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -418,7 +418,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStrea return FLAC__stream_decoder_set_metadata_ignore(decoder->private_->stream_decoder, type); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -429,7 +429,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__S return FLAC__stream_decoder_set_metadata_ignore_application(decoder->private_->stream_decoder, id); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -442,63 +442,63 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableS return FLAC__stream_decoder_set_metadata_ignore_all(decoder->private_->stream_decoder); } -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_state(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->md5_checking; } -unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channels(decoder->private_->stream_decoder); } -FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channel_assignment(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_bits_per_sample(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_sample_rate(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder) +FLAC_API unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_blocksize(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -516,7 +516,7 @@ FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *deco return true; } -FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -549,7 +549,7 @@ FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *deco return true; } -FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -569,7 +569,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDeco return ret; } -FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -589,7 +589,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__See return ret; } -FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__SeekableStreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -609,7 +609,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__Seeka return ret; } -FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample) +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample) { FLAC__uint64 length; diff --git a/src/libFLAC/seekable_stream_encoder.c b/src/libFLAC/seekable_stream_encoder.c index d8fb19ad..16740c08 100644 --- a/src/libFLAC/seekable_stream_encoder.c +++ b/src/libFLAC/seekable_stream_encoder.c @@ -68,7 +68,7 @@ typedef struct FLAC__SeekableStreamEncoderPrivate { * ***********************************************************************/ -const char * const FLAC__SeekableStreamEncoderStateString[] = { +FLAC_API const char * const FLAC__SeekableStreamEncoderStateString[] = { "FLAC__SEEKABLE_STREAM_ENCODER_OK", "FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR", "FLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR", @@ -81,7 +81,7 @@ const char * const FLAC__SeekableStreamEncoderStateString[] = { "FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED" }; -const char * const FLAC__SeekableStreamEncoderSeekStatusString[] = { +FLAC_API const char * const FLAC__SeekableStreamEncoderSeekStatusString[] = { "FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK", "FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_ERROR" }; @@ -93,7 +93,7 @@ const char * const FLAC__SeekableStreamEncoderSeekStatusString[] = { * ***********************************************************************/ -FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new() +FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new() { FLAC__SeekableStreamEncoder *encoder; @@ -135,7 +135,7 @@ FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new() return encoder; } -void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder) +FLAC_API void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->protected_); @@ -158,7 +158,7 @@ void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder) * ***********************************************************************/ -FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); @@ -196,7 +196,7 @@ FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__Seekab return encoder->protected_->state = FLAC__SEEKABLE_STREAM_ENCODER_OK; } -void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder) +FLAC_API void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -214,7 +214,7 @@ void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder) encoder->protected_->state = FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED; } -FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -225,7 +225,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder return FLAC__stream_encoder_set_verify(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -236,7 +236,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStr return FLAC__stream_encoder_set_streamable_subset(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -247,7 +247,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableSt return FLAC__stream_encoder_set_do_mid_side_stereo(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -258,7 +258,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__Seekabl return FLAC__stream_encoder_set_loose_mid_side_stereo(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -269,7 +269,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncode return FLAC__stream_encoder_set_channels(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -280,7 +280,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStrea return FLAC__stream_encoder_set_bits_per_sample(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -291,7 +291,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEnc return FLAC__stream_encoder_set_sample_rate(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -302,7 +302,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncod return FLAC__stream_encoder_set_blocksize(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -313,7 +313,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamE return FLAC__stream_encoder_set_max_lpc_order(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -324,7 +324,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableS return FLAC__stream_encoder_set_qlp_coeff_precision(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -335,7 +335,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__Seek return FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -346,7 +346,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStre return FLAC__stream_encoder_set_do_escape_coding(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -357,7 +357,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__Se return FLAC__stream_encoder_set_do_exhaustive_model_search(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -368,7 +368,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__ return FLAC__stream_encoder_set_min_residual_partition_order(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -379,7 +379,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__ return FLAC__stream_encoder_set_max_residual_partition_order(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__SeekableStreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__SeekableStreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -390,7 +390,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__Se return FLAC__stream_encoder_set_rice_parameter_search_dist(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -401,7 +401,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__Seekab return FLAC__stream_encoder_set_total_samples_estimate(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -421,7 +421,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncode return FLAC__stream_encoder_set_metadata(encoder->private_->stream_encoder, metadata, num_blocks); } -FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderSeekCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderSeekCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -432,7 +432,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamE return true; } -FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderWriteCallback value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderWriteCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -443,7 +443,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStream return true; } -FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEncoder *encoder, void *value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEncoder *encoder, void *value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -458,7 +458,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEnc * These three functions are not static, but not publically exposed in * include/FLAC/ either. They are used by the test suite. */ -FLAC__bool FLAC__seekable_stream_encoder_disable_constant_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_disable_constant_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -468,7 +468,7 @@ FLAC__bool FLAC__seekable_stream_encoder_disable_constant_subframes(FLAC__Seekab return FLAC__stream_encoder_disable_constant_subframes(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_disable_fixed_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_disable_fixed_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -478,7 +478,7 @@ FLAC__bool FLAC__seekable_stream_encoder_disable_fixed_subframes(FLAC__SeekableS return FLAC__stream_encoder_disable_fixed_subframes(encoder->private_->stream_encoder, value); } -FLAC__bool FLAC__seekable_stream_encoder_disable_verbatim_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_disable_verbatim_subframes(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -488,154 +488,154 @@ FLAC__bool FLAC__seekable_stream_encoder_disable_verbatim_subframes(FLAC__Seekab return FLAC__stream_encoder_disable_verbatim_subframes(encoder->private_->stream_encoder, value); } -FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_get_state(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_get_state(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->protected_); return encoder->protected_->state; } -FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encoder_state(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encoder_state(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_state(encoder->private_->stream_encoder); } -FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_verify_decoder_state(encoder->private_->stream_encoder); } -void FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) +FLAC_API void FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__stream_encoder_get_verify_decoder_error_stats(encoder->private_->stream_encoder, absolute_sample, frame_number, channel, sample, expected, got); } -FLAC__bool FLAC__seekable_stream_encoder_get_verify(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_verify(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_verify(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_streamable_subset(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_streamable_subset(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_streamable_subset(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_do_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_do_mid_side_stereo(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_loose_mid_side_stereo(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_channels(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_bits_per_sample(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_bits_per_sample(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_bits_per_sample(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_sample_rate(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_sample_rate(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_sample_rate(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_blocksize(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_max_lpc_order(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_max_lpc_order(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_max_lpc_order(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_qlp_coeff_precision(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_qlp_coeff_precision(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_qlp_coeff_precision(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_do_qlp_coeff_prec_search(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_do_escape_coding(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_escape_coding(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_do_escape_coding(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_do_exhaustive_model_search(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_min_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_min_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_min_residual_partition_order(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_max_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_max_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_max_residual_partition_order(encoder->private_->stream_encoder); } -unsigned FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API unsigned FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_rice_parameter_search_dist(encoder->private_->stream_encoder); } -FLAC__uint64 FLAC__seekable_stream_encoder_get_total_samples_estimate(const FLAC__SeekableStreamEncoder *encoder) +FLAC_API FLAC__uint64 FLAC__seekable_stream_encoder_get_total_samples_estimate(const FLAC__SeekableStreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); return FLAC__stream_encoder_get_total_samples_estimate(encoder->private_->stream_encoder); } -FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -648,7 +648,7 @@ FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *en } /* 'samples' is channel-wide samples, e.g. for 1 second at 44100Hz, 'samples' = 44100 regardless of the number of channels */ -FLAC__bool FLAC__seekable_stream_encoder_process_interleaved(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__seekable_stream_encoder_process_interleaved(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 655611c1..2b348c84 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -107,7 +107,7 @@ typedef struct FLAC__StreamDecoderPrivate { * ***********************************************************************/ -const char * const FLAC__StreamDecoderStateString[] = { +FLAC_API const char * const FLAC__StreamDecoderStateString[] = { "FLAC__STREAM_DECODER_SEARCH_FOR_METADATA", "FLAC__STREAM_DECODER_READ_METADATA", "FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC", @@ -121,18 +121,18 @@ const char * const FLAC__StreamDecoderStateString[] = { "FLAC__STREAM_DECODER_UNINITIALIZED" }; -const char * const FLAC__StreamDecoderReadStatusString[] = { +FLAC_API const char * const FLAC__StreamDecoderReadStatusString[] = { "FLAC__STREAM_DECODER_READ_STATUS_CONTINUE", "FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM", "FLAC__STREAM_DECODER_READ_STATUS_ABORT" }; -const char * const FLAC__StreamDecoderWriteStatusString[] = { +FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[] = { "FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE", "FLAC__STREAM_DECODER_WRITE_STATUS_ABORT" }; -const char * const FLAC__StreamDecoderErrorStatusString[] = { +FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[] = { "FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC", "FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER", "FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH" @@ -143,7 +143,7 @@ const char * const FLAC__StreamDecoderErrorStatusString[] = { * Class constructor/destructor * ***********************************************************************/ -FLAC__StreamDecoder *FLAC__stream_decoder_new() +FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new() { FLAC__StreamDecoder *decoder; unsigned i; @@ -207,7 +207,7 @@ FLAC__StreamDecoder *FLAC__stream_decoder_new() return decoder; } -void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder) +FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder) { unsigned i; @@ -237,7 +237,7 @@ void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder) * ***********************************************************************/ -FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -288,7 +288,7 @@ FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder) return decoder->protected_->state; } -void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder) +FLAC_API void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder) { unsigned i; FLAC__ASSERT(0 != decoder); @@ -325,7 +325,7 @@ void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder) decoder->protected_->state = FLAC__STREAM_DECODER_UNINITIALIZED; } -FLAC__bool FLAC__stream_decoder_set_read_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadCallback value) +FLAC_API FLAC__bool FLAC__stream_decoder_set_read_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -336,7 +336,7 @@ FLAC__bool FLAC__stream_decoder_set_read_callback(FLAC__StreamDecoder *decoder, return true; } -FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderWriteCallback value) +FLAC_API FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -347,7 +347,7 @@ FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderMetadataCallback value) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -358,7 +358,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_callback(FLAC__StreamDecoder *decod return true; } -FLAC__bool FLAC__stream_decoder_set_error_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorCallback value) +FLAC_API FLAC__bool FLAC__stream_decoder_set_error_callback(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -369,7 +369,7 @@ FLAC__bool FLAC__stream_decoder_set_error_callback(FLAC__StreamDecoder *decoder, return true; } -FLAC__bool FLAC__stream_decoder_set_client_data(FLAC__StreamDecoder *decoder, void *value) +FLAC_API FLAC__bool FLAC__stream_decoder_set_client_data(FLAC__StreamDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -380,7 +380,7 @@ FLAC__bool FLAC__stream_decoder_set_client_data(FLAC__StreamDecoder *decoder, vo return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -394,7 +394,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decode return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -420,7 +420,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDec return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder) { unsigned i; FLAC__ASSERT(0 != decoder); @@ -434,7 +434,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *de return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -448,7 +448,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -474,7 +474,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDeco return true; } -FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -486,49 +486,49 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *dec return true; } -FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder) +FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder) +FLAC_API unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->channels; } -FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder) +FLAC_API FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->channel_assignment; } -unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder) +FLAC_API unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->bits_per_sample; } -unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder) +FLAC_API unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->sample_rate; } -unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder) +FLAC_API unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->blocksize; } -FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -543,7 +543,7 @@ FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder) return true; } -FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -560,7 +560,7 @@ FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder) return true; } -FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder) { FLAC__bool got_a_frame; FLAC__ASSERT(0 != decoder); @@ -597,7 +597,7 @@ FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder) } } -FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -624,7 +624,7 @@ FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecode } } -FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder) +FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder) { FLAC__bool dummy; FLAC__ASSERT(0 != decoder); diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index ec5590aa..0e8a4b7c 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -388,7 +388,7 @@ typedef struct FLAC__StreamEncoderPrivate { * ***********************************************************************/ -const char * const FLAC__StreamEncoderStateString[] = { +FLAC_API const char * const FLAC__StreamEncoderStateString[] = { "FLAC__STREAM_ENCODER_OK", "FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR", "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA", @@ -413,7 +413,7 @@ const char * const FLAC__StreamEncoderStateString[] = { "FLAC__STREAM_ENCODER_UNINITIALIZED" }; -const char * const FLAC__StreamEncoderWriteStatusString[] = { +FLAC_API const char * const FLAC__StreamEncoderWriteStatusString[] = { "FLAC__STREAM_ENCODER_WRITE_STATUS_OK", "FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR" }; @@ -423,7 +423,7 @@ const char * const FLAC__StreamEncoderWriteStatusString[] = { * Class constructor/destructor * */ -FLAC__StreamEncoder *FLAC__stream_encoder_new() +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new() { FLAC__StreamEncoder *encoder; unsigned i; @@ -496,7 +496,7 @@ FLAC__StreamEncoder *FLAC__stream_encoder_new() return encoder; } -void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder) +FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder) { unsigned i; @@ -535,7 +535,7 @@ void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder) * ***********************************************************************/ -FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder) +FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder) { unsigned i; FLAC__bool metadata_has_seektable, metadata_has_vorbis_comment; @@ -907,7 +907,7 @@ FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder) return encoder->protected_->state; } -void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) +FLAC_API void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); @@ -936,7 +936,7 @@ void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder) encoder->protected_->state = FLAC__STREAM_ENCODER_UNINITIALIZED; } -FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -945,7 +945,7 @@ FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__b return true; } -FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -954,7 +954,7 @@ FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encod return true; } -FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -963,7 +963,7 @@ FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *enco return true; } -FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -972,7 +972,7 @@ FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *e return true; } -FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -981,7 +981,7 @@ FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsig return true; } -FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -990,7 +990,7 @@ FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder return true; } -FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -999,7 +999,7 @@ FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, un return true; } -FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1008,7 +1008,7 @@ FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsi return true; } -FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1017,7 +1017,7 @@ FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, return true; } -FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1026,7 +1026,7 @@ FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *enc return true; } -FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1035,7 +1035,7 @@ FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder return true; } -FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1049,7 +1049,7 @@ FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encode return true; } -FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1058,7 +1058,7 @@ FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncod return true; } -FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1067,7 +1067,7 @@ FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEnc return true; } -FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1076,7 +1076,7 @@ FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEnc return true; } -FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, unsigned value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1090,7 +1090,7 @@ FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncod return true; } -FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1099,7 +1099,7 @@ FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder * return true; } -FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) +FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1109,7 +1109,7 @@ FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC_ return true; } -FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != value); @@ -1119,7 +1119,7 @@ FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, return true; } -FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderMetadataCallback value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderMetadataCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != value); @@ -1129,7 +1129,7 @@ FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encod return true; } -FLAC__bool FLAC__stream_encoder_set_client_data(FLAC__StreamEncoder *encoder, void *value) +FLAC_API FLAC__bool FLAC__stream_encoder_set_client_data(FLAC__StreamEncoder *encoder, void *value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1142,7 +1142,7 @@ FLAC__bool FLAC__stream_encoder_set_client_data(FLAC__StreamEncoder *encoder, vo * These three functions are not static, but not publically exposed in * include/FLAC/ either. They are used by the test suite. */ -FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1151,7 +1151,7 @@ FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder * return true; } -FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1160,7 +1160,7 @@ FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *enc return true; } -FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) +FLAC_API FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) @@ -1169,13 +1169,13 @@ FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder * return true; } -FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->state; } -FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); if(encoder->protected_->verify) @@ -1184,7 +1184,7 @@ FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLA return FLAC__STREAM_DECODER_UNINITIALIZED; } -void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) +FLAC_API void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) { FLAC__ASSERT(0 != encoder); if(0 != absolute_sample) @@ -1201,109 +1201,109 @@ void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncod *got = encoder->private_->verify.error_stats.got; } -FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->verify; } -FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->streamable_subset; } -FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->do_mid_side_stereo; } -FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->loose_mid_side_stereo; } -unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->channels; } -unsigned FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->bits_per_sample; } -unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->sample_rate; } -unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->blocksize; } -unsigned FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->max_lpc_order; } -unsigned FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->qlp_coeff_precision; } -FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->do_qlp_coeff_prec_search; } -FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->do_escape_coding; } -FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->do_exhaustive_model_search; } -unsigned FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->min_residual_partition_order; } -unsigned FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->max_residual_partition_order; } -unsigned FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamEncoder *encoder) +FLAC_API unsigned FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->rice_parameter_search_dist; } -FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamEncoder *encoder) +FLAC_API FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); return encoder->protected_->total_samples_estimate; } -FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) { unsigned i, j, channel; FLAC__int32 x, mid, side; @@ -1363,7 +1363,7 @@ FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC return true; } -FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) +FLAC_API FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) { unsigned i, j, k, channel; FLAC__int32 x, mid, side; diff --git a/src/libOggFLAC/file_decoder.c b/src/libOggFLAC/file_decoder.c index 8995783a..924f825d 100644 --- a/src/libOggFLAC/file_decoder.c +++ b/src/libOggFLAC/file_decoder.c @@ -72,7 +72,7 @@ typedef struct FLAC__FileDecoderPrivate { * ***********************************************************************/ -const char * const FLAC__FileDecoderStateString[] = { +const OggFLAC_API char * const FLAC__FileDecoderStateString[] = { "FLAC__FILE_DECODER_OK", "FLAC__FILE_DECODER_END_OF_FILE", "FLAC__FILE_DECODER_ERROR_OPENING_FILE", @@ -90,7 +90,7 @@ const char * const FLAC__FileDecoderStateString[] = { * ***********************************************************************/ -FLAC__FileDecoder *FLAC__file_decoder_new() +OggFLAC_API FLAC__FileDecoder *FLAC__file_decoder_new() { FLAC__FileDecoder *decoder; @@ -134,7 +134,7 @@ FLAC__FileDecoder *FLAC__file_decoder_new() return decoder; } -void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) +OggFLAC_API void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -156,7 +156,7 @@ void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder) * ***********************************************************************/ -FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -190,7 +190,7 @@ FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder) return decoder->protected_->state = FLAC__FILE_DECODER_OK; } -FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -216,7 +216,7 @@ FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder) return FLAC__seekable_stream_decoder_finish(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC__bool value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -227,7 +227,7 @@ FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC_ return FLAC__seekable_stream_decoder_set_md5_checking(decoder->private_->seekable_stream_decoder, value); } -FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const char *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -249,7 +249,7 @@ FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const cha return true; } -FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderWriteCallback value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -260,7 +260,7 @@ FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLA return true; } -FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderMetadataCallback value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -271,7 +271,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, return true; } -FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderErrorCallback value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLAC__FileDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -282,7 +282,7 @@ FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLA return true; } -FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -293,7 +293,7 @@ FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void * return true; } -FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -304,7 +304,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, F return FLAC__seekable_stream_decoder_set_metadata_respond(decoder->private_->seekable_stream_decoder, type); } -FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -315,7 +315,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder return FLAC__seekable_stream_decoder_set_metadata_respond_application(decoder->private_->seekable_stream_decoder, id); } -FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -326,7 +326,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decode return FLAC__seekable_stream_decoder_set_metadata_respond_all(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -337,7 +337,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FL return FLAC__seekable_stream_decoder_set_metadata_ignore(decoder->private_->seekable_stream_decoder, type); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -348,7 +348,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder return FLAC__seekable_stream_decoder_set_metadata_ignore_application(decoder->private_->seekable_stream_decoder, id); } -FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -360,70 +360,70 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder } -FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_state(const FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_state(decoder->private_->seekable_stream_decoder); } -FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_stream_decoder_state(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_md5_checking(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder) +OggFLAC_API unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_channels(decoder->private_->seekable_stream_decoder); } -FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_channel_assignment(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder) +OggFLAC_API unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_bits_per_sample(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder) +OggFLAC_API unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_sample_rate(decoder->private_->seekable_stream_decoder); } -unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder) +OggFLAC_API unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__seekable_stream_decoder_get_blocksize(decoder->private_->seekable_stream_decoder); } -FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -443,7 +443,7 @@ FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder) return ret; } -FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -463,7 +463,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *d return ret; } -FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -483,7 +483,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decod return ret; } -FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample) +OggFLAC_API FLAC__bool FLAC__file_decoder_seek_absolute(FLAC__FileDecoder *decoder, FLAC__uint64 sample) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(decoder->protected_->state == FLAC__FILE_DECODER_OK || decoder->protected_->state == FLAC__FILE_DECODER_END_OF_FILE); diff --git a/src/libOggFLAC/seekable_stream_decoder.c b/src/libOggFLAC/seekable_stream_decoder.c index e42f576a..2d923c15 100644 --- a/src/libOggFLAC/seekable_stream_decoder.c +++ b/src/libOggFLAC/seekable_stream_decoder.c @@ -75,7 +75,7 @@ typedef struct FLAC__SeekableStreamDecoderPrivate { * ***********************************************************************/ -const char * const FLAC__SeekableStreamDecoderStateString[] = { +const OggFLAC_API char * const FLAC__SeekableStreamDecoderStateString[] = { "FLAC__SEEKABLE_STREAM_DECODER_OK", "FLAC__SEEKABLE_STREAM_DECODER_SEEKING", "FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM", @@ -88,22 +88,22 @@ const char * const FLAC__SeekableStreamDecoderStateString[] = { "FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED" }; -const char * const FLAC__SeekableStreamDecoderReadStatusString[] = { +const OggFLAC_API char * const FLAC__SeekableStreamDecoderReadStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderSeekStatusString[] = { +const OggFLAC_API char * const FLAC__SeekableStreamDecoderSeekStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderTellStatusString[] = { +const OggFLAC_API char * const FLAC__SeekableStreamDecoderTellStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR" }; -const char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { +const OggFLAC_API char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { "FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK", "FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR" }; @@ -115,7 +115,7 @@ const char * const FLAC__SeekableStreamDecoderLengthStatusString[] = { * ***********************************************************************/ -FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() +OggFLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() { FLAC__SeekableStreamDecoder *decoder; @@ -157,7 +157,7 @@ FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new() return decoder; } -void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -179,7 +179,7 @@ void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder) * ***********************************************************************/ -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -223,7 +223,7 @@ FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__Seekab return decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_OK; } -FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool md5_failed = false; @@ -255,7 +255,7 @@ FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *dec return !md5_failed; } -FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -265,7 +265,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDe return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -276,7 +276,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -287,7 +287,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -298,7 +298,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamD return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -309,7 +309,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStrea return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -320,7 +320,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDe return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -331,7 +331,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStream return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -342,7 +342,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStr return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -353,7 +353,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStream return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -364,7 +364,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDec return true; } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -379,7 +379,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStre return FLAC__stream_decoder_set_metadata_respond(decoder->private_->stream_decoder, type); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -390,7 +390,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__ return FLAC__stream_decoder_set_metadata_respond_application(decoder->private_->stream_decoder, id); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -403,7 +403,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__Seekable return FLAC__stream_decoder_set_metadata_respond_all(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -418,7 +418,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStrea return FLAC__stream_decoder_set_metadata_ignore(decoder->private_->stream_decoder, type); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -429,7 +429,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__S return FLAC__stream_decoder_set_metadata_ignore_application(decoder->private_->stream_decoder, id); } -FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -442,63 +442,63 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableS return FLAC__stream_decoder_set_metadata_ignore_all(decoder->private_->stream_decoder); } -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_state(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->md5_checking; } -unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channels(decoder->private_->stream_decoder); } -FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channel_assignment(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_bits_per_sample(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_sample_rate(decoder->private_->stream_decoder); } -unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_blocksize(decoder->private_->stream_decoder); } -FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -516,7 +516,7 @@ FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *deco return true; } -FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -549,7 +549,7 @@ FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *deco return true; } -FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -569,7 +569,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDeco return ret; } -FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -589,7 +589,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__See return ret; } -FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__SeekableStreamDecoder *decoder) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__SeekableStreamDecoder *decoder) { FLAC__bool ret; FLAC__ASSERT(0 != decoder); @@ -609,7 +609,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__Seeka return ret; } -FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample) +OggFLAC_API FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample) { FLAC__uint64 length; diff --git a/src/libOggFLAC/stream_decoder.c b/src/libOggFLAC/stream_decoder.c index 4c9d595d..cb3d34fe 100644 --- a/src/libOggFLAC/stream_decoder.c +++ b/src/libOggFLAC/stream_decoder.c @@ -67,7 +67,7 @@ typedef struct OggFLAC__StreamDecoderPrivate { * ***********************************************************************/ -const char * const OggFLAC__StreamDecoderStateString[] = { +const OggFLAC_API char * const OggFLAC__StreamDecoderStateString[] = { "OggFLAC__STREAM_DECODER_OK", "OggFLAC__STREAM_DECODER_OGG_ERROR", "OggFLAC__STREAM_DECODER_READ_ERROR", @@ -84,7 +84,7 @@ const char * const OggFLAC__StreamDecoderStateString[] = { * Class constructor/destructor * ***********************************************************************/ -OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new() +OggFLAC_API OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new() { OggFLAC__StreamDecoder *decoder; @@ -124,7 +124,7 @@ OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new() return decoder; } -void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder) +OggFLAC_API void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); @@ -146,7 +146,7 @@ void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder) * ***********************************************************************/ -OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder *decoder) +OggFLAC_API OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); @@ -176,7 +176,7 @@ OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder return decoder->protected_->state = OggFLAC__STREAM_DECODER_OK; } -void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder) +OggFLAC_API void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -197,7 +197,7 @@ void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder) decoder->protected_->state = OggFLAC__STREAM_DECODER_UNINITIALIZED; } -FLAC__bool OggFLAC__stream_decoder_set_read_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderReadCallback value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_read_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderReadCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -208,7 +208,7 @@ FLAC__bool OggFLAC__stream_decoder_set_read_callback(OggFLAC__StreamDecoder *dec return true; } -FLAC__bool OggFLAC__stream_decoder_set_write_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderWriteCallback value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_write_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderWriteCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -219,7 +219,7 @@ FLAC__bool OggFLAC__stream_decoder_set_write_callback(OggFLAC__StreamDecoder *de return true; } -FLAC__bool OggFLAC__stream_decoder_set_metadata_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderMetadataCallback value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderMetadataCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -230,7 +230,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_callback(OggFLAC__StreamDecoder return true; } -FLAC__bool OggFLAC__stream_decoder_set_error_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderErrorCallback value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_error_callback(OggFLAC__StreamDecoder *decoder, OggFLAC__StreamDecoderErrorCallback value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -241,7 +241,7 @@ FLAC__bool OggFLAC__stream_decoder_set_error_callback(OggFLAC__StreamDecoder *de return true; } -FLAC__bool OggFLAC__stream_decoder_set_client_data(OggFLAC__StreamDecoder *decoder, void *value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_client_data(OggFLAC__StreamDecoder *decoder, void *value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -252,7 +252,7 @@ FLAC__bool OggFLAC__stream_decoder_set_client_data(OggFLAC__StreamDecoder *decod return true; } -FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *decoder, long value) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *decoder, long value) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -264,7 +264,7 @@ FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *dec return true; } -FLAC__bool OggFLAC__stream_decoder_set_metadata_respond(OggFLAC__StreamDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_respond(OggFLAC__StreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -274,7 +274,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond(OggFLAC__StreamDecoder * return FLAC__stream_decoder_set_metadata_respond(decoder->private_->FLAC_stream_decoder, type); } -FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_application(OggFLAC__StreamDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_application(OggFLAC__StreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -284,7 +284,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_application(OggFLAC__Str return FLAC__stream_decoder_set_metadata_respond_application(decoder->private_->FLAC_stream_decoder, id); } -FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_all(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_all(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -294,7 +294,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_all(OggFLAC__StreamDecod return FLAC__stream_decoder_set_metadata_respond_all(decoder->private_->FLAC_stream_decoder); } -FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore(OggFLAC__StreamDecoder *decoder, FLAC__MetadataType type) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore(OggFLAC__StreamDecoder *decoder, FLAC__MetadataType type) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -304,7 +304,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore(OggFLAC__StreamDecoder *d return FLAC__stream_decoder_set_metadata_ignore(decoder->private_->FLAC_stream_decoder, type); } -FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_application(OggFLAC__StreamDecoder *decoder, const FLAC__byte id[4]) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_application(OggFLAC__StreamDecoder *decoder, const FLAC__byte id[4]) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -314,7 +314,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_application(OggFLAC__Stre return FLAC__stream_decoder_set_metadata_ignore_application(decoder->private_->FLAC_stream_decoder, id); } -FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_all(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_all(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -324,56 +324,56 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_all(OggFLAC__StreamDecode return FLAC__stream_decoder_set_metadata_ignore_all(decoder->private_->FLAC_stream_decoder); } -OggFLAC__StreamDecoderState OggFLAC__stream_decoder_get_state(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API OggFLAC__StreamDecoderState OggFLAC__stream_decoder_get_state(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->state; } -FLAC__StreamDecoderState OggFLAC__stream_decoder_get_FLAC_stream_decoder_state(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__StreamDecoderState OggFLAC__stream_decoder_get_FLAC_stream_decoder_state(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_state(decoder->private_->FLAC_stream_decoder); } -unsigned OggFLAC__stream_decoder_get_channels(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API unsigned OggFLAC__stream_decoder_get_channels(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channels(decoder->private_->FLAC_stream_decoder); } -FLAC__ChannelAssignment OggFLAC__stream_decoder_get_channel_assignment(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__ChannelAssignment OggFLAC__stream_decoder_get_channel_assignment(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_channel_assignment(decoder->private_->FLAC_stream_decoder); } -unsigned OggFLAC__stream_decoder_get_bits_per_sample(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API unsigned OggFLAC__stream_decoder_get_bits_per_sample(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_bits_per_sample(decoder->private_->FLAC_stream_decoder); } -unsigned OggFLAC__stream_decoder_get_sample_rate(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API unsigned OggFLAC__stream_decoder_get_sample_rate(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_sample_rate(decoder->private_->FLAC_stream_decoder); } -unsigned OggFLAC__stream_decoder_get_blocksize(const OggFLAC__StreamDecoder *decoder) +OggFLAC_API unsigned OggFLAC__stream_decoder_get_blocksize(const OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_get_blocksize(decoder->private_->FLAC_stream_decoder); } -FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -391,7 +391,7 @@ FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder) return true; } -FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); @@ -412,21 +412,21 @@ FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder) return true; } -FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_process_single(decoder->private_->FLAC_stream_decoder); } -FLAC__bool OggFLAC__stream_decoder_process_until_end_of_metadata(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_process_until_end_of_metadata(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); return FLAC__stream_decoder_process_until_end_of_metadata(decoder->private_->FLAC_stream_decoder); } -FLAC__bool OggFLAC__stream_decoder_process_until_end_of_stream(OggFLAC__StreamDecoder *decoder) +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_process_until_end_of_stream(OggFLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); diff --git a/src/libOggFLAC/stream_encoder.c b/src/libOggFLAC/stream_encoder.c index 0762f901..019edfe1 100644 --- a/src/libOggFLAC/stream_encoder.c +++ b/src/libOggFLAC/stream_encoder.c @@ -67,7 +67,7 @@ typedef struct OggFLAC__StreamEncoderPrivate { * ***********************************************************************/ -const char * const OggFLAC__StreamEncoderStateString[] = { +const OggFLAC_API char * const OggFLAC__StreamEncoderStateString[] = { "OggFLAC__STREAM_ENCODER_OK", "OggFLAC__STREAM_ENCODER_OGG_ERROR", "OggFLAC__STREAM_ENCODER_FLAC_STREAM_ENCODER_ERROR", @@ -83,7 +83,7 @@ const char * const OggFLAC__StreamEncoderStateString[] = { * Class constructor/destructor * */ -OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new() +OggFLAC_API OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new() { OggFLAC__StreamEncoder *encoder; @@ -123,7 +123,7 @@ OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new() return encoder; } -void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder) +OggFLAC_API void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->protected_); @@ -146,7 +146,7 @@ void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder) * ***********************************************************************/ -OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder *encoder) +OggFLAC_API OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); @@ -172,7 +172,7 @@ OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder return encoder->protected_->state = OggFLAC__STREAM_ENCODER_OK; } -void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder) +OggFLAC_API void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -192,7 +192,7 @@ void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder) encoder->protected_->state = OggFLAC__STREAM_ENCODER_UNINITIALIZED; } -FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *encoder, long value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *encoder, long value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -204,7 +204,7 @@ FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *enc return true; } -FLAC__bool OggFLAC__stream_encoder_set_verify(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_verify(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -215,7 +215,7 @@ FLAC__bool OggFLAC__stream_encoder_set_verify(OggFLAC__StreamEncoder *encoder, F return FLAC__stream_encoder_set_verify(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_streamable_subset(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_streamable_subset(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -226,7 +226,7 @@ FLAC__bool OggFLAC__stream_encoder_set_streamable_subset(OggFLAC__StreamEncoder return FLAC__stream_encoder_set_streamable_subset(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_do_mid_side_stereo(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_do_mid_side_stereo(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -237,7 +237,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_mid_side_stereo(OggFLAC__StreamEncoder return FLAC__stream_encoder_set_do_mid_side_stereo(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_loose_mid_side_stereo(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_loose_mid_side_stereo(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -248,7 +248,7 @@ FLAC__bool OggFLAC__stream_encoder_set_loose_mid_side_stereo(OggFLAC__StreamEnco return FLAC__stream_encoder_set_loose_mid_side_stereo(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_channels(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_channels(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -259,7 +259,7 @@ FLAC__bool OggFLAC__stream_encoder_set_channels(OggFLAC__StreamEncoder *encoder, return FLAC__stream_encoder_set_channels(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_bits_per_sample(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_bits_per_sample(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -270,7 +270,7 @@ FLAC__bool OggFLAC__stream_encoder_set_bits_per_sample(OggFLAC__StreamEncoder *e return FLAC__stream_encoder_set_bits_per_sample(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_sample_rate(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_sample_rate(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -281,7 +281,7 @@ FLAC__bool OggFLAC__stream_encoder_set_sample_rate(OggFLAC__StreamEncoder *encod return FLAC__stream_encoder_set_sample_rate(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_blocksize(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_blocksize(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -292,7 +292,7 @@ FLAC__bool OggFLAC__stream_encoder_set_blocksize(OggFLAC__StreamEncoder *encoder return FLAC__stream_encoder_set_blocksize(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_max_lpc_order(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_max_lpc_order(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -303,7 +303,7 @@ FLAC__bool OggFLAC__stream_encoder_set_max_lpc_order(OggFLAC__StreamEncoder *enc return FLAC__stream_encoder_set_max_lpc_order(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_qlp_coeff_precision(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_qlp_coeff_precision(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -314,7 +314,7 @@ FLAC__bool OggFLAC__stream_encoder_set_qlp_coeff_precision(OggFLAC__StreamEncode return FLAC__stream_encoder_set_qlp_coeff_precision(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -325,7 +325,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(OggFLAC__StreamE return FLAC__stream_encoder_set_do_qlp_coeff_prec_search(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_do_escape_coding(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_do_escape_coding(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -336,7 +336,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_escape_coding(OggFLAC__StreamEncoder * return FLAC__stream_encoder_set_do_escape_coding(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_do_exhaustive_model_search(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_do_exhaustive_model_search(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -347,7 +347,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_exhaustive_model_search(OggFLAC__Strea return FLAC__stream_encoder_set_do_exhaustive_model_search(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_min_residual_partition_order(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_min_residual_partition_order(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -358,7 +358,7 @@ FLAC__bool OggFLAC__stream_encoder_set_min_residual_partition_order(OggFLAC__Str return FLAC__stream_encoder_set_min_residual_partition_order(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_max_residual_partition_order(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_max_residual_partition_order(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -369,7 +369,7 @@ FLAC__bool OggFLAC__stream_encoder_set_max_residual_partition_order(OggFLAC__Str return FLAC__stream_encoder_set_max_residual_partition_order(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_rice_parameter_search_dist(OggFLAC__StreamEncoder *encoder, unsigned value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_rice_parameter_search_dist(OggFLAC__StreamEncoder *encoder, unsigned value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -380,7 +380,7 @@ FLAC__bool OggFLAC__stream_encoder_set_rice_parameter_search_dist(OggFLAC__Strea return FLAC__stream_encoder_set_rice_parameter_search_dist(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_total_samples_estimate(OggFLAC__StreamEncoder *encoder, FLAC__uint64 value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_total_samples_estimate(OggFLAC__StreamEncoder *encoder, FLAC__uint64 value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -391,7 +391,7 @@ FLAC__bool OggFLAC__stream_encoder_set_total_samples_estimate(OggFLAC__StreamEnc return FLAC__stream_encoder_set_total_samples_estimate(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_set_metadata(OggFLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_metadata(OggFLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -402,7 +402,7 @@ FLAC__bool OggFLAC__stream_encoder_set_metadata(OggFLAC__StreamEncoder *encoder, return FLAC__stream_encoder_set_metadata(encoder->private_->FLAC_stream_encoder, metadata, num_blocks); } -FLAC__bool OggFLAC__stream_encoder_set_write_callback(OggFLAC__StreamEncoder *encoder, OggFLAC__StreamEncoderWriteCallback value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_write_callback(OggFLAC__StreamEncoder *encoder, OggFLAC__StreamEncoderWriteCallback value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -414,7 +414,7 @@ FLAC__bool OggFLAC__stream_encoder_set_write_callback(OggFLAC__StreamEncoder *en return true; } -FLAC__bool OggFLAC__stream_encoder_set_client_data(OggFLAC__StreamEncoder *encoder, void *value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_client_data(OggFLAC__StreamEncoder *encoder, void *value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -429,7 +429,7 @@ FLAC__bool OggFLAC__stream_encoder_set_client_data(OggFLAC__StreamEncoder *encod * These three functions are not static, but not publically exposed in * include/FLAC/ either. They are used by the test suite. */ -FLAC__bool OggFLAC__stream_encoder_disable_constant_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_disable_constant_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -439,7 +439,7 @@ FLAC__bool OggFLAC__stream_encoder_disable_constant_subframes(OggFLAC__StreamEnc return FLAC__stream_encoder_disable_constant_subframes(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_disable_fixed_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_disable_fixed_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -449,7 +449,7 @@ FLAC__bool OggFLAC__stream_encoder_disable_fixed_subframes(OggFLAC__StreamEncode return FLAC__stream_encoder_disable_fixed_subframes(encoder->private_->FLAC_stream_encoder, value); } -FLAC__bool OggFLAC__stream_encoder_disable_verbatim_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_disable_verbatim_subframes(OggFLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -459,7 +459,7 @@ FLAC__bool OggFLAC__stream_encoder_disable_verbatim_subframes(OggFLAC__StreamEnc return FLAC__stream_encoder_disable_verbatim_subframes(encoder->private_->FLAC_stream_encoder, value); } -OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -467,7 +467,7 @@ OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__Str return encoder->protected_->state; } -FLAC__StreamEncoderState OggFLAC__stream_encoder_get_FLAC_stream_encoder_state(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__StreamEncoderState OggFLAC__stream_encoder_get_FLAC_stream_encoder_state(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -475,7 +475,7 @@ FLAC__StreamEncoderState OggFLAC__stream_encoder_get_FLAC_stream_encoder_state(c return FLAC__stream_encoder_get_state(encoder->private_->FLAC_stream_encoder); } -FLAC__StreamDecoderState OggFLAC__stream_encoder_get_verify_decoder_state(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__StreamDecoderState OggFLAC__stream_encoder_get_verify_decoder_state(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -483,14 +483,14 @@ FLAC__StreamDecoderState OggFLAC__stream_encoder_get_verify_decoder_state(const return FLAC__stream_encoder_get_verify_decoder_state(encoder->private_->FLAC_stream_encoder); } -void OggFLAC__stream_encoder_get_verify_decoder_error_stats(const OggFLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) +OggFLAC_API void OggFLAC__stream_encoder_get_verify_decoder_error_stats(const OggFLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__stream_encoder_get_verify_decoder_error_stats(encoder->private_->FLAC_stream_encoder, absolute_sample, frame_number, channel, sample, expected, got); } -FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -498,7 +498,7 @@ FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *enco return FLAC__stream_encoder_get_verify(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_streamable_subset(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_streamable_subset(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -506,7 +506,7 @@ FLAC__bool OggFLAC__stream_encoder_get_streamable_subset(const OggFLAC__StreamEn return FLAC__stream_encoder_get_streamable_subset(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_do_mid_side_stereo(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_do_mid_side_stereo(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -514,7 +514,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_mid_side_stereo(const OggFLAC__StreamE return FLAC__stream_encoder_get_do_mid_side_stereo(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_loose_mid_side_stereo(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_loose_mid_side_stereo(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -522,7 +522,7 @@ FLAC__bool OggFLAC__stream_encoder_get_loose_mid_side_stereo(const OggFLAC__Stre return FLAC__stream_encoder_get_loose_mid_side_stereo(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -530,7 +530,7 @@ unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *enco return FLAC__stream_encoder_get_channels(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_bits_per_sample(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_bits_per_sample(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -538,7 +538,7 @@ unsigned OggFLAC__stream_encoder_get_bits_per_sample(const OggFLAC__StreamEncode return FLAC__stream_encoder_get_bits_per_sample(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -546,7 +546,7 @@ unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *e return FLAC__stream_encoder_get_sample_rate(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -554,7 +554,7 @@ unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *enc return FLAC__stream_encoder_get_blocksize(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_max_lpc_order(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_max_lpc_order(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -562,7 +562,7 @@ unsigned OggFLAC__stream_encoder_get_max_lpc_order(const OggFLAC__StreamEncoder return FLAC__stream_encoder_get_max_lpc_order(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_qlp_coeff_precision(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_qlp_coeff_precision(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -570,7 +570,7 @@ unsigned OggFLAC__stream_encoder_get_qlp_coeff_precision(const OggFLAC__StreamEn return FLAC__stream_encoder_get_qlp_coeff_precision(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_do_qlp_coeff_prec_search(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_do_qlp_coeff_prec_search(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -578,7 +578,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_qlp_coeff_prec_search(const OggFLAC__S return FLAC__stream_encoder_get_do_qlp_coeff_prec_search(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_do_escape_coding(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_do_escape_coding(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -586,7 +586,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_escape_coding(const OggFLAC__StreamEnc return FLAC__stream_encoder_get_do_escape_coding(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_get_do_exhaustive_model_search(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_do_exhaustive_model_search(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -594,7 +594,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_exhaustive_model_search(const OggFLAC_ return FLAC__stream_encoder_get_do_exhaustive_model_search(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_min_residual_partition_order(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_min_residual_partition_order(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -602,7 +602,7 @@ unsigned OggFLAC__stream_encoder_get_min_residual_partition_order(const OggFLAC_ return FLAC__stream_encoder_get_min_residual_partition_order(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_max_residual_partition_order(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_max_residual_partition_order(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -610,7 +610,7 @@ unsigned OggFLAC__stream_encoder_get_max_residual_partition_order(const OggFLAC_ return FLAC__stream_encoder_get_max_residual_partition_order(encoder->private_->FLAC_stream_encoder); } -unsigned OggFLAC__stream_encoder_get_rice_parameter_search_dist(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API unsigned OggFLAC__stream_encoder_get_rice_parameter_search_dist(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -618,7 +618,7 @@ unsigned OggFLAC__stream_encoder_get_rice_parameter_search_dist(const OggFLAC__S return FLAC__stream_encoder_get_rice_parameter_search_dist(encoder->private_->FLAC_stream_encoder); } -FLAC__uint64 OggFLAC__stream_encoder_get_total_samples_estimate(const OggFLAC__StreamEncoder *encoder) +OggFLAC_API FLAC__uint64 OggFLAC__stream_encoder_get_total_samples_estimate(const OggFLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -626,7 +626,7 @@ FLAC__uint64 OggFLAC__stream_encoder_get_total_samples_estimate(const OggFLAC__S return FLAC__stream_encoder_get_total_samples_estimate(encoder->private_->FLAC_stream_encoder); } -FLAC__bool OggFLAC__stream_encoder_process(OggFLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_process(OggFLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); @@ -634,7 +634,7 @@ FLAC__bool OggFLAC__stream_encoder_process(OggFLAC__StreamEncoder *encoder, cons return FLAC__stream_encoder_process(encoder->private_->FLAC_stream_encoder, buffer, samples); } -FLAC__bool OggFLAC__stream_encoder_process_interleaved(OggFLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_process_interleaved(OggFLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); diff --git a/src/plugin_common/all.h b/src/plugin_common/all.h index 6a339ee6..5e5ac41b 100644 --- a/src/plugin_common/all.h +++ b/src/plugin_common/all.h @@ -19,6 +19,8 @@ #ifndef FLAC__PLUGIN_COMMON__ALL_H #define FLAC__PLUGIN_COMMON__ALL_H +#include "export.h" + #include "canonical_tag.h" #include "charset.h" #include "dither.h" diff --git a/src/plugin_common/canonical_tag.h b/src/plugin_common/canonical_tag.h index d0c57fd7..bcdcc1fd 100644 --- a/src/plugin_common/canonical_tag.h +++ b/src/plugin_common/canonical_tag.h @@ -19,6 +19,8 @@ #ifndef FLAC__PLUGIN_COMMON__CANONICAL_TAG_H #define FLAC__PLUGIN_COMMON__CANONICAL_TAG_H +#include "export.h" + #include "id3v1.h" typedef struct { @@ -34,22 +36,22 @@ typedef struct { char *comment; } FLAC_Plugin__CanonicalTag; -FLAC_Plugin__CanonicalTag *FLAC_plugin__canonical_tag_new(); -void FLAC_plugin__canonical_tag_delete(FLAC_Plugin__CanonicalTag *); -void FLAC_plugin__canonical_tag_init(FLAC_Plugin__CanonicalTag *); -void FLAC_plugin__canonical_tag_clear(FLAC_Plugin__CanonicalTag *); +PLUGIN_COMMON_API FLAC_Plugin__CanonicalTag *FLAC_plugin__canonical_tag_new(); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_delete(FLAC_Plugin__CanonicalTag *); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_init(FLAC_Plugin__CanonicalTag *); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_clear(FLAC_Plugin__CanonicalTag *); /* For each null field in dest, move the corresponding field from src * WATCHOUT: note that src is not-const, because fields are 'moved' from * src to dest and the src field is set to null. */ -void FLAC_plugin__canonical_tag_merge(FLAC_Plugin__CanonicalTag *dest, FLAC_Plugin__CanonicalTag *src); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_merge(FLAC_Plugin__CanonicalTag *dest, FLAC_Plugin__CanonicalTag *src); -void FLAC_plugin__canonical_tag_convert_from_id3v1(FLAC_Plugin__CanonicalTag *, const FLAC_Plugin__Id3v1_Tag *); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_convert_from_id3v1(FLAC_Plugin__CanonicalTag *, const FLAC_Plugin__Id3v1_Tag *); /* Returns a merged tag based on any Vorbis comments, id3v2 tag, and id3v1. * In case of overlaps the preceding precedence applies. */ -void FLAC_plugin__canonical_tag_get_combined(const char *filename, FLAC_Plugin__CanonicalTag *tag); +PLUGIN_COMMON_API void FLAC_plugin__canonical_tag_get_combined(const char *filename, FLAC_Plugin__CanonicalTag *tag); #endif diff --git a/src/plugin_common/charset.h b/src/plugin_common/charset.h index 51682c81..122d5211 100644 --- a/src/plugin_common/charset.h +++ b/src/plugin_common/charset.h @@ -30,10 +30,12 @@ * Prototypes * **************/ -char* FLAC_plugin__charset_get_current (void); -char* FLAC_plugin__charset_convert_string (const char *string, char *from, char *to); +#include "export.h" + +PLUGIN_COMMON_API char *FLAC_plugin__charset_get_current(); +PLUGIN_COMMON_API char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to); /* returns 1 for success, 0 for failure or no iconv */ -int FLAC_plugin__charset_test_conversion (char *from, char *to); +PLUGIN_COMMON_API int FLAC_plugin__charset_test_conversion(char *from, char *to); #endif diff --git a/src/plugin_common/dither.h b/src/plugin_common/dither.h index 0e5a9328..9e44cc29 100644 --- a/src/plugin_common/dither.h +++ b/src/plugin_common/dither.h @@ -19,10 +19,12 @@ #ifndef FLAC__PLUGIN_COMMON__DITHER_H #define FLAC__PLUGIN_COMMON__DITHER_H +#include "export.h" + #include "FLAC/ordinals.h" #define FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS 2 -unsigned FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, FLAC__int32 *input, unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps); +PLUGIN_COMMON_API unsigned FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, FLAC__int32 *input, unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps); #endif diff --git a/src/plugin_common/id3v1.h b/src/plugin_common/id3v1.h index e74e677e..2b78d3ac 100644 --- a/src/plugin_common/id3v1.h +++ b/src/plugin_common/id3v1.h @@ -21,6 +21,8 @@ #include +#include "export.h" + #include "FLAC/ordinals.h" typedef struct { @@ -42,12 +44,12 @@ typedef struct { unsigned char genre; } FLAC_Plugin__Id3v1_Tag; -FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag); +PLUGIN_COMMON_API FLAC__bool FLAC_plugin__id3v1_tag_get(const char *filename, FLAC_Plugin__Id3v1_Tag *tag); #define FLAC_PLUGIN__ID3V1_TAG_INVALID_GENRE 255 -const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code); -unsigned FLAC_plugin__id3v1_tag_genre_table_max(); +PLUGIN_COMMON_API const char *FLAC_plugin__id3v1_tag_get_genre_as_string(unsigned char genre_code); +PLUGIN_COMMON_API unsigned FLAC_plugin__id3v1_tag_genre_table_max(); #endif diff --git a/src/plugin_common/vorbiscomment.h b/src/plugin_common/vorbiscomment.h index e6ee09a4..cfd9c8ae 100644 --- a/src/plugin_common/vorbiscomment.h +++ b/src/plugin_common/vorbiscomment.h @@ -19,8 +19,10 @@ #ifndef FLAC__PLUGIN_COMMON__VORBISCOMMENT_H #define FLAC__PLUGIN_COMMON__VORBISCOMMENT_H +#include "export.h" + #include "canonical_tag.h" -void FLAC_plugin__vorbiscomment_get(const char *filename, FLAC_Plugin__CanonicalTag *tag); +PLUGIN_COMMON_API void FLAC_plugin__vorbiscomment_get(const char *filename, FLAC_Plugin__CanonicalTag *tag); #endif diff --git a/src/plugin_winamp2/in_flac.c b/src/plugin_winamp2/in_flac.c index e6c7d531..50c7281a 100644 --- a/src/plugin_winamp2/in_flac.c +++ b/src/plugin_winamp2/in_flac.c @@ -26,11 +26,6 @@ #include "FLAC/all.h" #include "plugin_common/all.h" -#ifdef max -#undef max -#endif -#define max(a,b) ((a)>(b)?(a):(b)) - #define FLAC__DO_DITHER diff --git a/src/share/getopt.c b/src/share/getopt.c index 86d362db..c634507c 100644 --- a/src/share/getopt.c +++ b/src/share/getopt.c @@ -125,7 +125,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -char *FLAC__share__optarg; +GETOPT_API char *FLAC__share__optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -140,7 +140,7 @@ char *FLAC__share__optarg; how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ -int FLAC__share__optind = 1; +GETOPT_API int FLAC__share__optind = 1; /* Formerly, initialization of getopt depended on FLAC__share__optind==0, which causes problems with re-calling getopt as programs generally don't @@ -160,13 +160,13 @@ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ -int FLAC__share__opterr = 1; +GETOPT_API int FLAC__share__opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ -int FLAC__share__optopt = '?'; +GETOPT_API int FLAC__share__optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. @@ -522,7 +522,7 @@ FLAC__share___getopt_initialize (argc, argv, optstring) If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ -int +GETOPT_API int FLAC__share___getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; @@ -978,7 +978,7 @@ FLAC__share___getopt_internal (argc, argv, optstring, longopts, longind, long_on } } -int +GETOPT_API int FLAC__share__getopt (argc, argv, optstring) int argc; char *const *argv; diff --git a/src/share/getopt1.c b/src/share/getopt1.c index f7628fad..42a7d149 100644 --- a/src/share/getopt1.c +++ b/src/share/getopt1.c @@ -79,7 +79,7 @@ #define NULL 0 #endif -int +GETOPT_API int FLAC__share__getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; @@ -95,7 +95,7 @@ FLAC__share__getopt_long (argc, argv, options, long_options, opt_index) but does match a short option, it is parsed as a short option instead. */ -int +GETOPT_API int FLAC__share__getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; diff --git a/src/share/utf8.c b/src/share/utf8.c index 174d51fe..7036ef8a 100644 --- a/src/share/utf8.c +++ b/src/share/utf8.c @@ -233,7 +233,7 @@ int iconvert(const char *fromcode, const char *tocode, static char *current_charset = 0; /* means "US-ASCII" */ -void convert_set_charset(const char *charset) +UTF8_API void convert_set_charset(const char *charset) { #ifdef HAVE_LANGINFO_CODESET @@ -296,7 +296,7 @@ static int convert_string(const char *fromcode, const char *tocode, return 3; } -int utf8_encode(const char *from, char **to) +UTF8_API int utf8_encode(const char *from, char **to) { char *charset; @@ -306,7 +306,7 @@ int utf8_encode(const char *from, char **to) return convert_string(charset, "UTF-8", from, to, '#'); } -int utf8_decode(const char *from, char **to) +UTF8_API int utf8_decode(const char *from, char **to) { char *charset;