diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2002-10-16 22:18:32 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2002-10-16 22:18:32 +0000 |
commit | 55bc58704e95419d32bd3317042b51e24e408f3e (patch) | |
tree | f91c9d23226327343412314c0274c8b39e7cbf51 /include | |
parent | fc701471a4908ef575c276e3258ef12d3c63e344 (diff) | |
download | flac-55bc58704e95419d32bd3317042b51e24e408f3e.tar.gz |
tweaks to build libs as DLLs under windows
Diffstat (limited to 'include')
-rw-r--r-- | include/FLAC++/all.h | 2 | ||||
-rw-r--r-- | include/FLAC++/decoder.h | 14 | ||||
-rw-r--r-- | include/FLAC++/encoder.h | 14 | ||||
-rw-r--r-- | include/FLAC++/metadata.h | 30 | ||||
-rw-r--r-- | include/FLAC/all.h | 2 | ||||
-rw-r--r-- | include/FLAC/file_decoder.h | 63 | ||||
-rw-r--r-- | include/FLAC/file_encoder.h | 101 | ||||
-rw-r--r-- | include/FLAC/format.h | 113 | ||||
-rw-r--r-- | include/FLAC/metadata.h | 107 | ||||
-rw-r--r-- | include/FLAC/seekable_stream_decoder.h | 79 | ||||
-rw-r--r-- | include/FLAC/seekable_stream_encoder.h | 101 | ||||
-rw-r--r-- | include/FLAC/stream_decoder.h | 61 | ||||
-rw-r--r-- | include/FLAC/stream_encoder.h | 99 | ||||
-rw-r--r-- | include/OggFLAC++/all.h | 2 | ||||
-rw-r--r-- | include/OggFLAC++/decoder.h | 6 | ||||
-rw-r--r-- | include/OggFLAC++/encoder.h | 6 | ||||
-rw-r--r-- | include/OggFLAC/all.h | 2 | ||||
-rw-r--r-- | include/OggFLAC/file_decoder.h | 66 | ||||
-rw-r--r-- | include/OggFLAC/seekable_stream_decoder.h | 74 | ||||
-rw-r--r-- | include/OggFLAC/stream_decoder.h | 60 | ||||
-rw-r--r-- | include/OggFLAC/stream_encoder.h | 100 | ||||
-rw-r--r-- | include/share/getopt.h | 33 | ||||
-rw-r--r-- | include/share/utf8.h | 27 |
23 files changed, 617 insertions, 545 deletions
diff --git a/include/FLAC++/all.h b/include/FLAC++/all.h index 88ce27d8..a4fe0f3c 100644 --- a/include/FLAC++/all.h +++ b/include/FLAC++/all.h @@ -20,6 +20,8 @@ #ifndef FLACPP__ALL_H #define FLACPP__ALL_H +#include "export.h" + #include "encoder.h" #include "decoder.h" #include "metadata.h" diff --git a/include/FLAC++/decoder.h b/include/FLAC++/decoder.h index add43dee..58c24767 100644 --- a/include/FLAC++/decoder.h +++ b/include/FLAC++/decoder.h @@ -20,6 +20,8 @@ #ifndef FLACPP__DECODER_H #define FLACPP__DECODER_H +#include "export.h" + #include "FLAC/file_decoder.h" #include "FLAC/seekable_stream_decoder.h" #include "FLAC/stream_decoder.h" @@ -74,9 +76,9 @@ namespace FLAC { /** This class wraps the ::FLAC__StreamDecoder. */ - class Stream { + class FLACPP_API Stream { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__StreamDecoderState state): state_(state) { } inline operator ::FLAC__StreamDecoderState() const { return state_; } @@ -160,9 +162,9 @@ namespace FLAC { /** This class wraps the ::FLAC__SeekableStreamDecoder. */ - class SeekableStream { + class FLACPP_API SeekableStream { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__SeekableStreamDecoderState state): state_(state) { } inline operator ::FLAC__SeekableStreamDecoderState() const { return state_; } @@ -255,9 +257,9 @@ namespace FLAC { /** This class wraps the ::FLAC__FileDecoder. */ - class File { + class FLACPP_API File { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__FileDecoderState state): state_(state) { } inline operator ::FLAC__FileDecoderState() const { return state_; } diff --git a/include/FLAC++/encoder.h b/include/FLAC++/encoder.h index e0fd6ff1..d02b1ce5 100644 --- a/include/FLAC++/encoder.h +++ b/include/FLAC++/encoder.h @@ -20,6 +20,8 @@ #ifndef FLACPP__ENCODER_H #define FLACPP__ENCODER_H +#include "export.h" + #include "FLAC/file_encoder.h" #include "FLAC/seekable_stream_encoder.h" #include "FLAC/stream_encoder.h" @@ -75,9 +77,9 @@ namespace FLAC { /** This class wraps the ::FLAC__StreamEncoder. */ - class Stream { + class FLACPP_API Stream { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__StreamEncoderState state): state_(state) { } inline operator ::FLAC__StreamEncoderState() const { return state_; } @@ -168,9 +170,9 @@ namespace FLAC { /** This class wraps the ::FLAC__SeekableStreamEncoder. */ - class SeekableStream { + class FLACPP_API SeekableStream { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__SeekableStreamEncoderState state): state_(state) { } inline operator ::FLAC__SeekableStreamEncoderState() const { return state_; } @@ -262,9 +264,9 @@ namespace FLAC { /** This class wraps the ::FLAC__FileEncoder. */ - class File { + class FLACPP_API File { public: - class State { + class FLACPP_API State { public: inline State(::FLAC__FileEncoderState state): state_(state) { } inline operator ::FLAC__FileEncoderState() const { return state_; } diff --git a/include/FLAC++/metadata.h b/include/FLAC++/metadata.h index c55d8c48..5bbfb346 100644 --- a/include/FLAC++/metadata.h +++ b/include/FLAC++/metadata.h @@ -20,6 +20,8 @@ #ifndef FLACPP__METADATA_H #define FLACPP__METADATA_H +#include "export.h" + #include "FLAC/metadata.h" // =============================================================== @@ -87,7 +89,7 @@ namespace FLAC { /** Base class for all metadata block types. */ - class Prototype { + class FLACPP_API Prototype { protected: //@{ /** Constructs a copy of the given object. This form @@ -214,13 +216,13 @@ namespace FLAC { { return 0 != object_; } /** Create a deep copy of an object and return it. */ - Prototype *clone(const Prototype *); + FLACPP_API Prototype *clone(const Prototype *); /** STREAMINFO metadata block. * See <A HREF="../format.html#metadata_block_streaminfo">format specification</A>. */ - class StreamInfo : public Prototype { + class FLACPP_API StreamInfo : public Prototype { public: StreamInfo(); @@ -288,7 +290,7 @@ namespace FLAC { /** PADDING metadata block. * See <A HREF="../format.html#metadata_block_padding">format specification</A>. */ - class Padding : public Prototype { + class FLACPP_API Padding : public Prototype { public: Padding(); @@ -335,7 +337,7 @@ namespace FLAC { /** APPLICATION metadata block. * See <A HREF="../format.html#metadata_block_application">format specification</A>. */ - class Application : public Prototype { + class FLACPP_API Application : public Prototype { public: Application(); // @@ -388,7 +390,7 @@ namespace FLAC { /** SEEKTABLE metadata block. * See <A HREF="../format.html#metadata_block_seektable">format specification</A>. */ - class SeekTable : public Prototype { + class FLACPP_API SeekTable : public Prototype { public: SeekTable(); @@ -448,7 +450,7 @@ namespace FLAC { /** VORBIS_COMMENT metadata block. * See <A HREF="../format.html#metadata_block_vorbis_comment">format specification</A>. */ - class VorbisComment : public Prototype { + class FLACPP_API VorbisComment : public Prototype { public: /** Convenience class for encapsulating Vorbis comment * entries. An entry is a vendor string or a comment @@ -474,7 +476,7 @@ namespace FLAC { * Always check is_valid() after the constructor or operator= * to make sure memory was properly allocated. */ - class Entry { + class FLACPP_API Entry { public: Entry(); Entry(const char *field, unsigned field_length); @@ -590,7 +592,7 @@ namespace FLAC { */ //! See FLAC__metadata_get_streaminfo(). - bool get_streaminfo(const char *filename, StreamInfo &streaminfo); + FLACPP_API bool get_streaminfo(const char *filename, StreamInfo &streaminfo); /* \} */ @@ -627,9 +629,9 @@ namespace FLAC { /** This class is a wrapper around the FLAC__metadata_simple_iterator * structures and methods; see ::FLAC__Metadata_SimpleIterator. */ - class SimpleIterator { + class FLACPP_API SimpleIterator { public: - class Status { + class FLACPP_API Status { public: inline Status(::FLAC__Metadata_SimpleIteratorStatus status): status_(status) { } inline operator ::FLAC__Metadata_SimpleIteratorStatus() const { return status_; } @@ -704,9 +706,9 @@ namespace FLAC { /** This class is a wrapper around the FLAC__metadata_chain * structures and methods; see ::FLAC__Metadata_Chain. */ - class Chain { + class FLACPP_API Chain { public: - class Status { + class FLACPP_API Status { public: inline Status(::FLAC__Metadata_ChainStatus status): status_(status) { } inline operator ::FLAC__Metadata_ChainStatus() const { return status_; } @@ -737,7 +739,7 @@ namespace FLAC { /** This class is a wrapper around the FLAC__metadata_iterator * structures and methods; see ::FLAC__Metadata_Iterator. */ - class Iterator { + class FLACPP_API Iterator { public: Iterator(); virtual ~Iterator(); diff --git a/include/FLAC/all.h b/include/FLAC/all.h index 0cde47eb..f5eccbfa 100644 --- a/include/FLAC/all.h +++ b/include/FLAC/all.h @@ -20,6 +20,8 @@ #ifndef FLAC__ALL_H #define FLAC__ALL_H +#include "export.h" + #include "assert.h" #include "file_decoder.h" #include "file_encoder.h" diff --git a/include/FLAC/file_decoder.h b/include/FLAC/file_decoder.h index b63aeafb..f03dcc7f 100644 --- a/include/FLAC/file_decoder.h +++ b/include/FLAC/file_decoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__FILE_DECODER_H #define FLAC__FILE_DECODER_H +#include "export.h" #include "seekable_stream_decoder.h" #ifdef __cplusplus @@ -146,7 +147,7 @@ typedef enum { * Using a FLAC__FileDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__FileDecoderStateString[]; +extern FLAC_API const char * const FLAC__FileDecoderStateString[]; /*********************************************************************** @@ -216,7 +217,7 @@ typedef void (*FLAC__FileDecoderErrorCallback)(const FLAC__FileDecoder *decoder, * \retval FLAC__FileDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__FileDecoder *FLAC__file_decoder_new(); +FLAC_API FLAC__FileDecoder *FLAC__file_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -224,7 +225,7 @@ FLAC__FileDecoder *FLAC__file_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder); +FLAC_API void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder); /*********************************************************************** @@ -245,7 +246,7 @@ void FLAC__file_decoder_delete(FLAC__FileDecoder *decoder); * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Set the input file name to decode. * @@ -259,7 +260,7 @@ FLAC__bool FLAC__file_decoder_set_md5_checking(FLAC__FileDecoder *decoder, FLAC_ * \c false if the decoder is already initialized, or there was a memory * allocation error, else \c true. */ -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); /** Set the write callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -277,7 +278,7 @@ FLAC__bool FLAC__file_decoder_set_filename(FLAC__FileDecoder *decoder, const cha * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the metadata callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -295,7 +296,7 @@ FLAC__bool FLAC__file_decoder_set_write_callback(FLAC__FileDecoder *decoder, FLA * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the error callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -313,7 +314,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_callback(FLAC__FileDecoder *decoder, * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -327,7 +328,7 @@ FLAC__bool FLAC__file_decoder_set_error_callback(FLAC__FileDecoder *decoder, FLA * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond(). @@ -342,7 +343,7 @@ FLAC__bool FLAC__file_decoder_set_client_data(FLAC__FileDecoder *decoder, void * * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond_application(). @@ -357,7 +358,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond(FLAC__FileDecoder *decoder, F * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond_all(). @@ -370,7 +371,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_application(FLAC__FileDecoder * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore(). @@ -385,7 +386,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_respond_all(FLAC__FileDecoder *decode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore_application(). @@ -400,7 +401,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore(FLAC__FileDecoder *decoder, FL * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore_all(). @@ -413,7 +414,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_application(FLAC__FileDecoder * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Get the current decoder state. * @@ -423,7 +424,7 @@ FLAC__bool FLAC__file_decoder_set_metadata_ignore_all(FLAC__FileDecoder *decoder * \retval FLAC__FileDecoderState * The current decoder state. */ -FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder); +FLAC_API FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *decoder); /** Get the state of the underlying seekable stream decoder. * Useful when the file decoder state is @@ -435,7 +436,7 @@ FLAC__FileDecoderState FLAC__file_decoder_get_state(const FLAC__FileDecoder *dec * \retval FLAC__SeekableStreamDecoderState * The seekable stream decoder 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); /** Get the state of the underlying stream decoder. * Useful when the file decoder state is @@ -448,7 +449,7 @@ FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream_decoder_ * \retval FLAC__StreamDecoderState * The seekable stream decoder state. */ -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); /** Get the "MD5 signature checking" flag. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -460,7 +461,7 @@ FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC_ * \retval FLAC__bool * See above. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_channels(). @@ -471,7 +472,7 @@ FLAC__bool FLAC__file_decoder_get_md5_checking(const FLAC__FileDecoder *decoder) * \retval unsigned * See above. */ -unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder); +FLAC_API unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_channel_assignment(). @@ -482,7 +483,7 @@ unsigned FLAC__file_decoder_get_channels(const FLAC__FileDecoder *decoder); * \retval FLAC__ChannelAssignment * See above. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_bits_per_sample(). @@ -493,7 +494,7 @@ FLAC__ChannelAssignment FLAC__file_decoder_get_channel_assignment(const FLAC__Fi * \retval unsigned * See above. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_sample_rate(). @@ -504,7 +505,7 @@ unsigned FLAC__file_decoder_get_bits_per_sample(const FLAC__FileDecoder *decoder * \retval unsigned * See above. */ -unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder); +FLAC_API unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_blocksize(). @@ -515,7 +516,7 @@ unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *decoder); * \retval unsigned * See above. */ -unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder); +FLAC_API unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder); /** Initialize the decoder instance. * Should be called after FLAC__file_decoder_new() and @@ -531,7 +532,7 @@ unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder); * \c FLAC__FILE_DECODER_OK if initialization was successful; see * FLAC__FileDecoderState for the meanings of other return values. */ -FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder); +FLAC_API FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -552,7 +553,7 @@ FLAC__FileDecoderState FLAC__file_decoder_init(FLAC__FileDecoder *decoder); * signature does not match the one computed by the decoder; else * \c true. */ -FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder); +FLAC_API FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_single(). @@ -563,7 +564,7 @@ FLAC__bool FLAC__file_decoder_finish(FLAC__FileDecoder *decoder); * \retval FLAC__bool * See above. */ -FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder); +FLAC_API FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_until_end_of_metadata(). @@ -574,7 +575,7 @@ FLAC__bool FLAC__file_decoder_process_single(FLAC__FileDecoder *decoder); * \retval FLAC__bool * See above. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_until_end_of_stream(). @@ -585,7 +586,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_metadata(FLAC__FileDecoder *d * \retval FLAC__bool * See above. */ -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); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_remaining_frames(). @@ -596,7 +597,7 @@ FLAC__bool FLAC__file_decoder_process_until_end_of_file(FLAC__FileDecoder *decod * \retval FLAC__bool * See above. */ -FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decoder); +FLAC_API FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decoder); /** Flush the input and seek to an absolute sample. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -609,7 +610,7 @@ FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decode * \retval FLAC__bool * \c true if successful, else \c false. */ -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); /* \} */ diff --git a/include/FLAC/file_encoder.h b/include/FLAC/file_encoder.h index e8fd4779..2cf4841e 100644 --- a/include/FLAC/file_encoder.h +++ b/include/FLAC/file_encoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__FILE_ENCODER_H #define FLAC__FILE_ENCODER_H +#include "export.h" #include "seekable_stream_encoder.h" #ifdef __cplusplus @@ -129,7 +130,7 @@ typedef enum { * Using a FLAC__FileEncoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__FileEncoderStateString[]; +extern FLAC_API const char * const FLAC__FileEncoderStateString[]; /*********************************************************************** @@ -177,7 +178,7 @@ typedef void (*FLAC__FileEncoderProgressCallback)(const FLAC__FileEncoder *encod * \retval FLAC__FileEncoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__FileEncoder *FLAC__file_encoder_new(); +FLAC_API FLAC__FileEncoder *FLAC__file_encoder_new(); /** Free an encoder instance. Deletes the object pointed to by \a encoder. * @@ -185,7 +186,7 @@ FLAC__FileEncoder *FLAC__file_encoder_new(); * \assert * \code encoder != NULL \endcode */ -void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder); +FLAC_API void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder); /*********************************************************************** * @@ -204,7 +205,7 @@ void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder); * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_streamable_subset(). @@ -217,7 +218,7 @@ FLAC__bool FLAC__file_encoder_set_verify(FLAC__FileEncoder *encoder, FLAC__bool * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_do_mid_side_stereo(). @@ -230,7 +231,7 @@ FLAC__bool FLAC__file_encoder_set_streamable_subset(FLAC__FileEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(). @@ -243,7 +244,7 @@ FLAC__bool FLAC__file_encoder_set_do_mid_side_stereo(FLAC__FileEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_channels(). @@ -256,7 +257,7 @@ FLAC__bool FLAC__file_encoder_set_loose_mid_side_stereo(FLAC__FileEncoder *encod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_bits_per_sample(). @@ -273,7 +274,7 @@ FLAC__bool FLAC__file_encoder_set_channels(FLAC__FileEncoder *encoder, unsigned * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_sample_rate(). @@ -286,7 +287,7 @@ FLAC__bool FLAC__file_encoder_set_bits_per_sample(FLAC__FileEncoder *encoder, un * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_blocksize(). @@ -299,7 +300,7 @@ FLAC__bool FLAC__file_encoder_set_sample_rate(FLAC__FileEncoder *encoder, unsign * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_max_lpc_order(). @@ -312,7 +313,7 @@ FLAC__bool FLAC__file_encoder_set_blocksize(FLAC__FileEncoder *encoder, unsigned * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_qlp_coeff_precision(). @@ -329,7 +330,7 @@ FLAC__bool FLAC__file_encoder_set_max_lpc_order(FLAC__FileEncoder *encoder, unsi * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(). @@ -342,7 +343,7 @@ FLAC__bool FLAC__file_encoder_set_qlp_coeff_precision(FLAC__FileEncoder *encoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_do_escape_coding(). @@ -355,7 +356,7 @@ FLAC__bool FLAC__file_encoder_set_do_qlp_coeff_prec_search(FLAC__FileEncoder *en * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(). @@ -368,7 +369,7 @@ FLAC__bool FLAC__file_encoder_set_do_escape_coding(FLAC__FileEncoder *encoder, F * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_min_residual_partition_order(). @@ -381,7 +382,7 @@ FLAC__bool FLAC__file_encoder_set_do_exhaustive_model_search(FLAC__FileEncoder * * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_max_residual_partition_order(). @@ -394,7 +395,7 @@ FLAC__bool FLAC__file_encoder_set_min_residual_partition_order(FLAC__FileEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(). @@ -407,7 +408,7 @@ FLAC__bool FLAC__file_encoder_set_max_residual_partition_order(FLAC__FileEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_total_samples_estimate(). @@ -420,7 +421,7 @@ FLAC__bool FLAC__file_encoder_set_rice_parameter_search_dist(FLAC__FileEncoder * * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__SeekableStreamEncoder; see * FLAC__seekable_stream_encoder_set_metadata(). @@ -434,7 +435,7 @@ FLAC__bool FLAC__file_encoder_set_total_samples_estimate(FLAC__FileEncoder *enco * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the output file name encode to. * @@ -455,7 +456,7 @@ FLAC__bool FLAC__file_encoder_set_metadata(FLAC__FileEncoder *encoder, FLAC__Str * \c false if the encoder is already initialized, or there was a memory * allocation error, else \c true. */ -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); /** Set the progress callback. * The supplied function will be called when the encoder has finished @@ -476,7 +477,7 @@ FLAC__bool FLAC__file_encoder_set_filename(FLAC__FileEncoder *encoder, const cha * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -490,7 +491,7 @@ FLAC__bool FLAC__file_encoder_set_progress_callback(FLAC__FileEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Get the current encoder state. * @@ -500,7 +501,7 @@ FLAC__bool FLAC__file_encoder_set_client_data(FLAC__FileEncoder *encoder, void * * \retval FLAC__FileEncoderState * The current encoder state. */ -FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *encoder); +FLAC_API FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *encoder); /** Get the state of the underlying seekable stream encoder. * Useful when the file encoder state is @@ -512,7 +513,7 @@ FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *enc * \retval FLAC__SeekableStreamEncoderState * The seekable stream encoder 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); /** Get the state of the underlying stream encoder. * Useful when the file encoder state is @@ -525,7 +526,7 @@ FLAC__SeekableStreamEncoderState FLAC__file_encoder_get_seekable_stream_encoder_ * \retval FLAC__StreamEncoderState * The seekable stream encoder state. */ -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); /** Get the state of the underlying stream encoder's verify decoder. * Useful when the file encoder state is @@ -539,7 +540,7 @@ FLAC__StreamEncoderState FLAC__file_encoder_get_stream_encoder_state(const FLAC_ * \retval FLAC__StreamDecoderState * The stream encoder state. */ -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); /** Get relevant values about the nature of a verify decoder error. * Inherited from FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(). @@ -561,7 +562,7 @@ FLAC__StreamDecoderState FLAC__file_encoder_get_verify_decoder_state(const FLAC_ * \assert * \code encoder != NULL \endcode */ -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); /** Get the "verify" flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -573,7 +574,7 @@ void FLAC__file_encoder_get_verify_decoder_error_stats(const FLAC__FileEncoder * * \retval FLAC__bool * See FLAC__file_encoder_set_verify(). */ -FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder); +FLAC_API FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder); /** Get the "streamable subset" flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -585,7 +586,7 @@ FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder); * \retval FLAC__bool * See FLAC__file_encoder_set_streamable_subset(). */ -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); /** Get the "mid/side stereo coding" flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -597,7 +598,7 @@ FLAC__bool FLAC__file_encoder_get_streamable_subset(const FLAC__FileEncoder *enc * \retval FLAC__bool * See FLAC__file_encoder_get_do_mid_side_stereo(). */ -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); /** Get the "adaptive mid/side switching" flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -609,7 +610,7 @@ FLAC__bool FLAC__file_encoder_get_do_mid_side_stereo(const FLAC__FileEncoder *en * \retval FLAC__bool * See FLAC__file_encoder_set_loose_mid_side_stereo(). */ -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); /** Get the number of input channels being processed. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -621,7 +622,7 @@ FLAC__bool FLAC__file_encoder_get_loose_mid_side_stereo(const FLAC__FileEncoder * \retval unsigned * See FLAC__file_encoder_set_channels(). */ -unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder); +FLAC_API unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder); /** Get the input sample resolution setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -633,7 +634,7 @@ unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder); * \retval unsigned * See FLAC__file_encoder_set_bits_per_sample(). */ -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); /** Get the input sample rate setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -645,7 +646,7 @@ unsigned FLAC__file_encoder_get_bits_per_sample(const FLAC__FileEncoder *encoder * \retval unsigned * See FLAC__file_encoder_set_sample_rate(). */ -unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder); +FLAC_API unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder); /** Get the blocksize setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -657,7 +658,7 @@ unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder); * \retval unsigned * See FLAC__file_encoder_set_blocksize(). */ -unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder); +FLAC_API unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder); /** Get the maximum LPC order setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -669,7 +670,7 @@ unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder); * \retval unsigned * See FLAC__file_encoder_set_max_lpc_order(). */ -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); /** Get the quantized linear predictor coefficient precision setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -681,7 +682,7 @@ unsigned FLAC__file_encoder_get_max_lpc_order(const FLAC__FileEncoder *encoder); * \retval unsigned * See FLAC__file_encoder_set_qlp_coeff_precision(). */ -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); /** Get the qlp coefficient precision search flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -693,7 +694,7 @@ unsigned FLAC__file_encoder_get_qlp_coeff_precision(const FLAC__FileEncoder *enc * \retval FLAC__bool * See FLAC__file_encoder_set_do_qlp_coeff_prec_search(). */ -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); /** Get the "escape coding" flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -705,7 +706,7 @@ FLAC__bool FLAC__file_encoder_get_do_qlp_coeff_prec_search(const FLAC__FileEncod * \retval FLAC__bool * See FLAC__file_encoder_set_do_escape_coding(). */ -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); /** Get the exhaustive model search flag. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -717,7 +718,7 @@ FLAC__bool FLAC__file_encoder_get_do_escape_coding(const FLAC__FileEncoder *enco * \retval FLAC__bool * See FLAC__file_encoder_set_do_exhaustive_model_search(). */ -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); /** Get the minimum residual partition order setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -729,7 +730,7 @@ FLAC__bool FLAC__file_encoder_get_do_exhaustive_model_search(const FLAC__FileEnc * \retval unsigned * See FLAC__file_encoder_set_min_residual_partition_order(). */ -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); /** Get maximum residual partition order setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -741,7 +742,7 @@ unsigned FLAC__file_encoder_get_min_residual_partition_order(const FLAC__FileEnc * \retval unsigned * See FLAC__file_encoder_set_max_residual_partition_order(). */ -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); /** Get the Rice parameter search distance setting. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -753,7 +754,7 @@ unsigned FLAC__file_encoder_get_max_residual_partition_order(const FLAC__FileEnc * \retval unsigned * See FLAC__file_encoder_set_rice_parameter_search_dist(). */ -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); /** Get the previously set estimate of the total samples to be encoded. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -765,7 +766,7 @@ unsigned FLAC__file_encoder_get_rice_parameter_search_dist(const FLAC__FileEncod * \retval FLAC__uint64 * See FLAC__file_encoder_set_total_samples_estimate(). */ -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); /** Initialize the encoder instance. * Should be called after FLAC__file_encoder_new() and @@ -781,7 +782,7 @@ FLAC__uint64 FLAC__file_encoder_get_total_samples_estimate(const FLAC__FileEncod * \c FLAC__FILE_ENCODER_OK if initialization was successful; see * FLAC__FileEncoderState for the meanings of other return values. */ -FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder); +FLAC_API FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder); /** Finish the encoding process. * Flushes the encoding buffer, releases resources, resets the encoder @@ -797,7 +798,7 @@ FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder); * \assert * \code encoder != NULL \endcode */ -void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder); +FLAC_API void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder); /** Submit data for encoding. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -814,7 +815,7 @@ void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder); * encoder state with FLAC__file_encoder_get_state() to see what * went wrong. */ -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); /** Submit data for encoding. * This is inherited from FLAC__SeekableStreamEncoder; see @@ -834,7 +835,7 @@ FLAC__bool FLAC__file_encoder_process(FLAC__FileEncoder *encoder, const FLAC__in * encoder state with FLAC__file_encoder_get_state() to see what * went wrong. */ -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); /* \} */ diff --git a/include/FLAC/format.h b/include/FLAC/format.h index d8da7926..15d2d175 100644 --- a/include/FLAC/format.h +++ b/include/FLAC/format.h @@ -20,6 +20,7 @@ #ifndef FLAC__FORMAT_H #define FLAC__FORMAT_H +#include "export.h" #include "ordinals.h" #ifdef __cplusplus @@ -134,24 +135,24 @@ extern "C" { * This does not correspond to the shared library version number, which * is used to determine binary compatibility. */ -extern const char *FLAC__VERSION_STRING; +extern FLAC_API const char *FLAC__VERSION_STRING; /** The vendor string inserted by the encoder into the VORBIS_COMMENT block. * This is a nulL-terminated ASCII string; when inserted into the * VORBIS_COMMENT the trailing null is stripped. */ -extern const char *FLAC__VENDOR_STRING; +extern FLAC_API const char *FLAC__VENDOR_STRING; /** The byte string representation of the beginning of a FLAC stream. */ -extern const FLAC__byte FLAC__STREAM_SYNC_STRING[4]; /* = "fLaC" */ +extern FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4]; /* = "fLaC" */ /** The 32-bit integer big-endian representation of the beginning of * a FLAC stream. */ -extern const unsigned FLAC__STREAM_SYNC; /* = 0x664C6143 */ +extern FLAC_API const unsigned FLAC__STREAM_SYNC; /* = 0x664C6143 */ /** The length of the FLAC signature in bits. */ -extern const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */ +extern FLAC_API const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */ /** The length of the FLAC signature in bytes. */ #define FLAC__STREAM_SYNC_LENGTH (4u) @@ -177,7 +178,7 @@ typedef enum { * Using a FLAC__EntropyCodingMethodType as the index to this array will * give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__EntropyCodingMethodTypeString[]; +extern FLAC_API const char * const FLAC__EntropyCodingMethodTypeString[]; /** Contents of a Rice partitioned residual @@ -209,11 +210,11 @@ typedef struct { } FLAC__EntropyCodingMethod_PartitionedRice; -extern const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN; /**< == 5 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN; /**< == 5 (bits) */ -extern const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER; +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER; /**< == (1<<FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN)-1 */ /** Header for the entropy coding method. (c.f. <A HREF="../format.html#residual">format specification</A>) @@ -225,7 +226,7 @@ typedef struct { } data; } FLAC__EntropyCodingMethod; -extern const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN; /**< == 2 (bits) */ +extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN; /**< == 2 (bits) */ /*****************************************************************************/ @@ -242,7 +243,7 @@ typedef enum { * Using a FLAC__SubframeType as the index to this array will * give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SubframeTypeString[]; +extern FLAC_API const char * const FLAC__SubframeTypeString[]; /** CONSTANT subframe. (c.f. <A HREF="../format.html#subframe_constant">format specification</A>) @@ -301,8 +302,8 @@ typedef struct { /**< The residual signal, length == (blocksize minus order) samples. */ } FLAC__Subframe_LPC; -extern const unsigned FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN; /**< == 5 (bits) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN; /**< == 5 (bits) */ /** FLAC subframe structure. (c.f. <A HREF="../format.html#subframe">format specification</A>) @@ -318,14 +319,14 @@ typedef struct { unsigned wasted_bits; } FLAC__Subframe; -extern const unsigned FLAC__SUBFRAME_ZERO_PAD_LEN; /**< == 1 (bit) */ -extern const unsigned FLAC__SUBFRAME_TYPE_LEN; /**< == 6 (bits) */ -extern const unsigned FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_ZERO_PAD_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LEN; /**< == 6 (bits) */ +extern FLAC_API const unsigned FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN; /**< == 1 (bit) */ -extern const unsigned FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK; /* = 0x00 */ -extern const unsigned FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK; /* = 0x02 */ -extern const unsigned FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK; /* = 0x10 */ -extern const unsigned FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK; /* = 0x40 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK; /* = 0x00 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK; /* = 0x02 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK; /* = 0x10 */ +extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK; /* = 0x40 */ /*****************************************************************************/ @@ -349,7 +350,7 @@ typedef enum { * Using a FLAC__ChannelAssignment as the index to this array will * give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__ChannelAssignmentString[]; +extern FLAC_API const char * const FLAC__ChannelAssignmentString[]; /** An enumeration of the possible frame numbering methods. */ typedef enum { @@ -362,7 +363,7 @@ typedef enum { * Using a FLAC__FrameNumberType as the index to this array will * give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__FrameNumberTypeString[]; +extern FLAC_API const char * const FLAC__FrameNumberTypeString[]; /** FLAC frame header structure. (c.f. <A HREF="../format.html#frame_header">format specification</A>) @@ -400,15 +401,15 @@ typedef struct { */ } FLAC__FrameHeader; -extern const unsigned FLAC__FRAME_HEADER_SYNC; /**< == 0x3ffe; the frame header sync code */ -extern const unsigned FLAC__FRAME_HEADER_SYNC_LEN; /**< == 14 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_RESERVED_LEN; /**< == 2 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN; /**< == 4 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN; /**< == 3 (bits) */ -extern const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN; /**< == 1 (bit) */ -extern const unsigned FLAC__FRAME_HEADER_CRC_LEN; /**< == 8 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC; /**< == 0x3ffe; the frame header sync code */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC_LEN; /**< == 14 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_RESERVED_LEN; /**< == 2 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN; /**< == 4 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN; /**< == 3 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__FRAME_HEADER_CRC_LEN; /**< == 8 (bits) */ /** FLAC frame footer structure. (c.f. <A HREF="../format.html#frame_footer">format specification</A>) @@ -421,7 +422,7 @@ typedef struct { */ } FLAC__FrameFooter; -extern const unsigned FLAC__FRAME_FOOTER_CRC_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__FRAME_FOOTER_CRC_LEN; /**< == 16 (bits) */ /** FLAC frame structure. (c.f. <A HREF="../format.html#frame">format specification</A>) @@ -466,7 +467,7 @@ typedef enum { * Using a FLAC__MetadataType as the index to this array will * give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__MetadataTypeString[]; +extern FLAC_API const char * const FLAC__MetadataTypeString[]; /** FLAC STREAMINFO structure. (c.f. <A HREF="../format.html#metadata_block_streaminfo">format specification</A>) @@ -481,15 +482,15 @@ typedef struct { FLAC__byte md5sum[16]; } FLAC__StreamMetadata_StreamInfo; -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN; /**< == 16 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN; /**< == 16 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN; /**< == 24 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN; /**< == 24 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN; /**< == 20 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN; /**< == 3 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN; /**< == 5 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN; /**< == 36 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN; /**< == 128 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN; /**< == 24 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN; /**< == 24 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN; /**< == 20 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN; /**< == 3 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN; /**< == 5 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN; /**< == 36 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN; /**< == 128 (bits) */ /** The total stream length of the STREAMINFO block in bytes. */ #define FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u) @@ -512,7 +513,7 @@ typedef struct { FLAC__byte *data; } FLAC__StreamMetadata_Application; -extern const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN; /**< == 32 (bits) */ /** SeekPoint structure used in SEEKTABLE blocks. (c.f. <A HREF="../format.html#seekpoint">format specification</A>) */ @@ -528,9 +529,9 @@ typedef struct { /**< The number of samples in the target frame. */ } FLAC__StreamMetadata_SeekPoint; -extern const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN; /**< == 64 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN; /**< == 64 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN; /**< == 16 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN; /**< == 64 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN; /**< == 16 (bits) */ /** The total stream length of a seek point in bytes. */ #define FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u) @@ -539,7 +540,7 @@ extern const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN; /**< == * FLAC__StreamMetadataSeekPoint used to indicate a placeholder * point (== 0xffffffffffffffff). */ -extern const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; +extern FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; /** FLAC SEEKTABLE structure. (c.f. <A HREF="../format.html#metadata_block_seektable">format specification</A>) @@ -567,7 +568,7 @@ typedef struct { FLAC__byte *entry; } FLAC__StreamMetadata_VorbisComment_Entry; -extern const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN; /**< == 32 (bits) */ /** FLAC VORBIS_COMMENT structure. (c.f. <A HREF="../format.html#metadata_block_vorbis_comment">format specification</A>) @@ -578,7 +579,7 @@ typedef struct { FLAC__StreamMetadata_VorbisComment_Entry *comments; } FLAC__StreamMetadata_VorbisComment; -extern const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN; /**< == 32 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN; /**< == 32 (bits) */ /** FLAC metadata block structure. (c.f. <A HREF="../format.html#metadata_block">format specification</A>) @@ -605,9 +606,9 @@ typedef struct { * to use. */ } FLAC__StreamMetadata; -extern const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN; /**< == 1 (bit) */ -extern const unsigned FLAC__STREAM_METADATA_TYPE_LEN; /**< == 7 (bits) */ -extern const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN; /**< == 1 (bit) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_TYPE_LEN; /**< == 7 (bits) */ +extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bits) */ /** The total stream length of a metadata block header in bytes. */ #define FLAC__STREAM_METADATA_HEADER_LENGTH (4u) @@ -629,7 +630,7 @@ extern const unsigned FLAC__STREAM_METADATA_LENGTH_LEN; /**< == 24 (bits) */ * \c true if the given sample rate conforms to the specification, else * \c false. */ -FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate); +FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate); /** Check a seek table to see if it conforms to the FLAC specification. * See the format specification for limits on the contents of the @@ -641,7 +642,7 @@ FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate); * \retval FLAC__bool * \c false if seek table is illegal, else \c true. */ -FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table); +FLAC_API FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table); /** Sort a seek table's seek points according to the format specification. * This includes a "unique-ification" step to remove duplicates, i.e. @@ -655,7 +656,7 @@ FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable * \retval unsigned * The number of duplicate seek points converted into placeholders. */ -unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table); +FLAC_API unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table); /* \} */ diff --git a/include/FLAC/metadata.h b/include/FLAC/metadata.h index fcf1482b..6e27ccdd 100644 --- a/include/FLAC/metadata.h +++ b/include/FLAC/metadata.h @@ -20,6 +20,7 @@ #ifndef FLAC__METADATA_H #define FLAC__METADATA_H +#include "export.h" #include "format.h" /****************************************************************************** @@ -125,7 +126,7 @@ extern "C" { * \c false if there was a memory allocation error, a file decoder error, * or the file contained no STREAMINFO block. */ -FLAC__bool FLAC__metadata_get_streaminfo(const char *filename, FLAC__StreamMetadata *streaminfo); +FLAC_API FLAC__bool FLAC__metadata_get_streaminfo(const char *filename, FLAC__StreamMetadata *streaminfo); /* \} */ @@ -245,7 +246,7 @@ typedef enum { * Using a FLAC__Metadata_SimpleIteratorStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__Metadata_SimpleIteratorStatusString[]; +extern FLAC_API const char * const FLAC__Metadata_SimpleIteratorStatusString[]; /** Create a new iterator instance. @@ -253,7 +254,7 @@ extern const char * const FLAC__Metadata_SimpleIteratorStatusString[]; * \retval FLAC__Metadata_SimpleIterator* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(); +FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(); /** Free an iterator instance. Deletes the object pointed to by \a iterator. * @@ -261,7 +262,7 @@ FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(); * \assert * \code iterator != NULL \endcode */ -void FLAC__metadata_simple_iterator_delete(FLAC__Metadata_SimpleIterator *iterator); +FLAC_API void FLAC__metadata_simple_iterator_delete(FLAC__Metadata_SimpleIterator *iterator); /** Get the current status of the iterator. Call this after a function * returns \c false to get the reason for the error. Also resets the status @@ -273,7 +274,7 @@ void FLAC__metadata_simple_iterator_delete(FLAC__Metadata_SimpleIterator *iterat * \retval FLAC__Metadata_SimpleIteratorStatus * The current status of the iterator. */ -FLAC__Metadata_SimpleIteratorStatus FLAC__metadata_simple_iterator_status(FLAC__Metadata_SimpleIterator *iterator); +FLAC_API FLAC__Metadata_SimpleIteratorStatus FLAC__metadata_simple_iterator_status(FLAC__Metadata_SimpleIterator *iterator); /** Initialize the iterator to point to the first metadata block in the * given FLAC file. @@ -294,7 +295,7 @@ FLAC__Metadata_SimpleIteratorStatus FLAC__metadata_simple_iterator_status(FLAC__ * \c false if a memory allocation error occurs, the file can't be * opened, or another error occurs, else \c true. */ -FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats); +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats); /** Returns \c true if the FLAC file is writable. If \c false, calls to * FLAC__metadata_simple_iterator_set_block() and @@ -306,7 +307,7 @@ FLAC__bool FLAC__metadata_simple_iterator_init(FLAC__Metadata_SimpleIterator *it * \retval FLAC__bool * See above. */ -FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_SimpleIterator *iterator); +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_SimpleIterator *iterator); /** Moves the iterator forward one metadata block, returning \c false if * already at the end. @@ -320,7 +321,7 @@ FLAC__bool FLAC__metadata_simple_iterator_is_writable(const FLAC__Metadata_Simpl * \c false if already at the last metadata block of the chain, else * \c true. */ -FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator); +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *iterator); /** Moves the iterator backward one metadata block, returning \c false if * already at the beginning. @@ -334,7 +335,7 @@ FLAC__bool FLAC__metadata_simple_iterator_next(FLAC__Metadata_SimpleIterator *it * \c false if already at the first metadata block of the chain, else * \c true. */ -FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator); +FLAC_API FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *iterator); /** Get the type of the metadata block at the current position. This * avoids reading the actual block data which can save time for large @@ -349,7 +350,7 @@ FLAC__bool FLAC__metadata_simple_iterator_prev(FLAC__Metadata_SimpleIterator *it * The type of the metadata block at the current iterator position. */ -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); /** Get the metadata block at the current position. You can modify the * block but must use FLAC__metadata_simple_iterator_set_block() to @@ -366,7 +367,7 @@ FLAC__MetadataType FLAC__metadata_simple_iterator_get_block_type(const FLAC__Met * \retval FLAC__StreamMetadata* * The current metadata block. */ -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); /** Write a block back to the FLAC file. This function tries to be * as efficient as possible; how the block is actually written is @@ -422,7 +423,7 @@ FLAC__StreamMetadata *FLAC__metadata_simple_iterator_get_block(FLAC__Metadata_Si * \retval FLAC__bool * \c true if successful, else \c false. */ -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); /** This is similar to FLAC__metadata_simple_iterator_set_block() * except that instead of writing over an existing block, it appends @@ -447,7 +448,7 @@ FLAC__bool FLAC__metadata_simple_iterator_set_block(FLAC__Metadata_SimpleIterato * \retval FLAC__bool * \c true if successful, else \c false. */ -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); /** Deletes the block at the current position. This will cause the * entire FLAC file to be rewritten, unless \a use_padding is \c true, @@ -466,7 +467,7 @@ FLAC__bool FLAC__metadata_simple_iterator_insert_block_after(FLAC__Metadata_Simp * \retval FLAC__bool * \c true if successful, else \c false. */ -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); /* \} */ @@ -580,7 +581,7 @@ typedef enum { * Using a FLAC__Metadata_ChainStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__Metadata_ChainStatusString[]; +extern FLAC_API const char * const FLAC__Metadata_ChainStatusString[]; /*********** FLAC__Metadata_Chain ***********/ @@ -589,7 +590,7 @@ extern const char * const FLAC__Metadata_ChainStatusString[]; * \retval FLAC__Metadata_Chain* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__Metadata_Chain *FLAC__metadata_chain_new(); +FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(); /** Free a chain instance. Deletes the object pointed to by \a chain. * @@ -597,7 +598,7 @@ FLAC__Metadata_Chain *FLAC__metadata_chain_new(); * \assert * \code chain != NULL \endcode */ -void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain); +FLAC_API void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain); /** Get the current status of the chain. Call this after a function * returns \c false to get the reason for the error. Also resets the @@ -609,7 +610,7 @@ void FLAC__metadata_chain_delete(FLAC__Metadata_Chain *chain); * \retval FLAC__Metadata_ChainStatus * The current status of the 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); /** Read all metadata from a FLAC file into the chain. * @@ -623,7 +624,7 @@ FLAC__Metadata_ChainStatus FLAC__metadata_chain_status(FLAC__Metadata_Chain *cha * \a filename, else \c false. On failure, check the status with * FLAC__metadata_chain_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); /** Write all metadata out to the FLAC file. This function tries to be as * efficient as possible; how the metadata is actually written is shown by @@ -665,7 +666,7 @@ FLAC__bool FLAC__metadata_chain_read(FLAC__Metadata_Chain *chain, const char *fi * \c true if the write succeeded, else \c false. On failure, * check the status with FLAC__metadata_chain_status(). */ -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); /** Merge adjacent PADDING blocks into a single block. * @@ -679,7 +680,7 @@ FLAC__bool FLAC__metadata_chain_write(FLAC__Metadata_Chain *chain, FLAC__bool us * \assert * \code chain != NULL \endcode */ -void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain); +FLAC_API void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain); /** This function will move all PADDING blocks to the end on the metadata, * then merge them into a single block. @@ -694,7 +695,7 @@ void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain); * \assert * \code chain != NULL \endcode */ -void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); +FLAC_API void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); /*********** FLAC__Metadata_Iterator ***********/ @@ -704,7 +705,7 @@ void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); * \retval FLAC__Metadata_Iterator* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(); +FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(); /** Free an iterator instance. Deletes the object pointed to by \a iterator. * @@ -712,7 +713,7 @@ FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(); * \assert * \code iterator != NULL \endcode */ -void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator); +FLAC_API void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator); /** Initialize the iterator to point to the first metadata block in the * given chain. @@ -723,7 +724,7 @@ void FLAC__metadata_iterator_delete(FLAC__Metadata_Iterator *iterator); * \code iterator != NULL \endcode * \code chain != NULL \endcode */ -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); /** Moves the iterator forward one metadata block, returning \c false if * already at the end. @@ -737,7 +738,7 @@ void FLAC__metadata_iterator_init(FLAC__Metadata_Iterator *iterator, FLAC__Metad * \c false if already at the last metadata block of the chain, else * \c true. */ -FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator); +FLAC_API FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator); /** Moves the iterator backward one metadata block, returning \c false if * already at the beginning. @@ -751,7 +752,7 @@ FLAC__bool FLAC__metadata_iterator_next(FLAC__Metadata_Iterator *iterator); * \c false if already at the first metadata block of the chain, else * \c true. */ -FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator); +FLAC_API FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator); /** Get the type of the metadata block at the current position. * @@ -763,7 +764,7 @@ FLAC__bool FLAC__metadata_iterator_prev(FLAC__Metadata_Iterator *iterator); * \retval FLAC__MetadataType * The type of the metadata block at the current iterator position. */ -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); /** Get the metadata block at the current position. You can modify * the block in place but must write the chain before the changes @@ -784,7 +785,7 @@ FLAC__MetadataType FLAC__metadata_iterator_get_block_type(const FLAC__Metadata_I * \retval FLAC__StreamMetadata* * The current metadata block. */ -FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator *iterator); +FLAC_API FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator *iterator); /** Set the metadata block at the current position, replacing the existing * block. The new block passed in becomes owned by the chain and it will be @@ -801,7 +802,7 @@ FLAC__StreamMetadata *FLAC__metadata_iterator_get_block(FLAC__Metadata_Iterator * \c false if the conditions in the above description are not met, or * a memory allocation error occurs, otherwise \c true. */ -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); /** Removes the current block from the chain. If \a replace_with_padding is * \c true, the block will instead be replaced with a padding block of equal @@ -819,7 +820,7 @@ FLAC__bool FLAC__metadata_iterator_set_block(FLAC__Metadata_Iterator *iterator, * \c false if the conditions in the above description are not met, * otherwise \c true. */ -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); /** Insert a new block before the current block. You cannot insert a block * before the first STREAMINFO block. You cannot insert a STREAMINFO block @@ -838,7 +839,7 @@ FLAC__bool FLAC__metadata_iterator_delete_block(FLAC__Metadata_Iterator *iterato * \c false if the conditions in the above description are not met, or * a memory allocation error occurs, otherwise \c 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); /** Insert a new block after the current block. You cannot insert a STREAMINFO * block as there can be only one, the one that already exists at the head when @@ -856,7 +857,7 @@ FLAC__bool FLAC__metadata_iterator_insert_block_before(FLAC__Metadata_Iterator * * \c false if the conditions in the above description are not met, or * a memory allocation error occurs, otherwise \c 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); /* \} */ @@ -908,7 +909,7 @@ FLAC__bool FLAC__metadata_iterator_insert_block_after(FLAC__Metadata_Iterator *i * \retval FLAC__StreamMetadata* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type); +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type); /** Create a copy of an existing metadata object. * @@ -922,7 +923,7 @@ FLAC__StreamMetadata *FLAC__metadata_object_new(FLAC__MetadataType type); * \retval FLAC__StreamMetadata* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object); +FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object); /** Free a metadata object. Deletes the object pointed to by \a object. * @@ -933,7 +934,7 @@ FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *ob * \assert * \code object != NULL \endcode */ -void FLAC__metadata_object_delete(FLAC__StreamMetadata *object); +FLAC_API void FLAC__metadata_object_delete(FLAC__StreamMetadata *object); /** Compares two metadata objects. * @@ -948,7 +949,7 @@ void FLAC__metadata_object_delete(FLAC__StreamMetadata *object); * \retval FLAC__bool * \c true if objects are identical, else \c false. */ -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); /** Sets the application data of an APPLICATION block. * @@ -968,7 +969,7 @@ FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, co * \retval FLAC__bool * \c false if \a copy is \c true and malloc fails, else \c true. */ -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); /** Resize the seekpoint array. * @@ -985,7 +986,7 @@ FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *obje * \retval FLAC__bool * \c false if memory allocation error, else \c 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); /** Set a seekpoint in a seektable. * @@ -997,7 +998,7 @@ FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *o * \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \code object->data.seek_table.num_points > point_num \endcode */ -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); /** Insert a seekpoint into a seektable. * @@ -1011,7 +1012,7 @@ void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, uns * \retval FLAC__bool * \c false if memory allocation error, else \c true. */ -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); /** Delete a seekpoint from a seektable. * @@ -1024,7 +1025,7 @@ FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *ob * \retval FLAC__bool * \c false if memory allocation error, else \c 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); /** Check a seektable to see if it conforms to the FLAC specification. * See the format specification for limits on the contents of the @@ -1037,7 +1038,7 @@ FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *ob * \retval FLAC__bool * \c false if seek table is illegal, else \c true. */ -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); /** Append a number of placeholder points to the end of a seek table. * @@ -1054,7 +1055,7 @@ FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata * * \retval FLAC__bool * \c false if memory allocation fails, else \c true. */ -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); /** Append a specific seek point template to the end of a seek table. * @@ -1071,7 +1072,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__St * \retval FLAC__bool * \c false if memory allocation fails, else \c 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); /** Append specific seek point templates to the end of a seek table. * @@ -1089,7 +1090,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMet * \retval FLAC__bool * \c false if memory allocation fails, else \c 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); /** Append a set of evenly-spaced seek point templates to the end of a * seek table. @@ -1110,7 +1111,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMe * \retval FLAC__bool * \c false if memory allocation fails, else \c 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); /** Sort a seek table's seek points according to the format specification, * removing duplicates. @@ -1127,7 +1128,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__S * \retval FLAC__bool * \c false if realloc fails, else \c 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); /** Sets the vendor string in a VORBIS_COMMENT block. * @@ -1146,7 +1147,7 @@ FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *o * \retval FLAC__bool * \c false if \a copy is \c true and malloc fails, else \c true. */ -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); /** Resize the comment array. * @@ -1163,7 +1164,7 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMet * \retval FLAC__bool * \c false if memory allocation error, else \c true. */ -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); /** Sets a comment in a VORBIS_COMMENT block. * @@ -1183,7 +1184,7 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetad * \retval FLAC__bool * \c false if \a copy is \c true and malloc fails, else \c 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); /** Insert a comment in a VORBIS_COMMENT block at the given index. * @@ -1207,7 +1208,7 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata * \retval FLAC__bool * \c false if \a copy is \c true and malloc fails, else \c true. */ -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); /** Delete a comment in a VORBIS_COMMENT block at the given index. * @@ -1226,7 +1227,7 @@ FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetada * \retval FLAC__bool * \c false if realloc fails, else \c true. */ -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); /* \} */ diff --git a/include/FLAC/seekable_stream_decoder.h b/include/FLAC/seekable_stream_decoder.h index a6441acb..3492b439 100644 --- a/include/FLAC/seekable_stream_decoder.h +++ b/include/FLAC/seekable_stream_decoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__SEEKABLE_STREAM_DECODER_H #define FLAC__SEEKABLE_STREAM_DECODER_H +#include "export.h" #include "stream_decoder.h" #ifdef __cplusplus @@ -162,7 +163,7 @@ typedef enum { * Using a FLAC__SeekableStreamDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamDecoderStateString[]; +extern FLAC_API const char * const FLAC__SeekableStreamDecoderStateString[]; /** Return values for the FLAC__SeekableStreamDecoder read callback. @@ -182,7 +183,7 @@ typedef enum { * Using a FLAC__SeekableStreamDecoderReadStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamDecoderReadStatusString[]; +extern FLAC_API const char * const FLAC__SeekableStreamDecoderReadStatusString[]; /** Return values for the FLAC__SeekableStreamDecoder seek callback. @@ -202,7 +203,7 @@ typedef enum { * Using a FLAC__SeekableStreamDecoderSeekStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamDecoderSeekStatusString[]; +extern FLAC_API const char * const FLAC__SeekableStreamDecoderSeekStatusString[]; /** Return values for the FLAC__SeekableStreamDecoder tell callback. @@ -222,7 +223,7 @@ typedef enum { * Using a FLAC__SeekableStreamDecoderTellStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamDecoderTellStatusString[]; +extern FLAC_API const char * const FLAC__SeekableStreamDecoderTellStatusString[]; /** Return values for the FLAC__SeekableStreamDecoder length callback. @@ -242,7 +243,7 @@ typedef enum { * Using a FLAC__SeekableStreamDecoderLengthStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamDecoderLengthStatusString[]; +extern FLAC_API const char * const FLAC__SeekableStreamDecoderLengthStatusString[]; /*********************************************************************** @@ -379,7 +380,7 @@ typedef void (*FLAC__SeekableStreamDecoderErrorCallback)(const FLAC__SeekableStr * \retval FLAC__SeekableStreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new(); +FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -387,7 +388,7 @@ FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder); +FLAC_API void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder); /*********************************************************************** @@ -413,7 +414,7 @@ void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder); * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Set the read callback. * This is inherited from FLAC__StreamDecoder; see @@ -431,7 +432,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDe * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the seek callback. * The supplied function will be called when the decoder needs to seek @@ -450,7 +451,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamD * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the tell callback. * The supplied function will be called when the decoder wants to know @@ -469,7 +470,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamD * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the length callback. * The supplied function will be called when the decoder wants to know @@ -487,7 +488,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamD * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the eof callback. * The supplied function will be called when the decoder needs to know @@ -505,7 +506,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStrea * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the write callback. * This is inherited from FLAC__StreamDecoder; see @@ -523,7 +524,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDe * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the metadata callback. * This is inherited from FLAC__StreamDecoder; see @@ -541,7 +542,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStream * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the error callback. * This is inherited from FLAC__StreamDecoder; see @@ -559,7 +560,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStr * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -573,7 +574,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStream * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond(). @@ -588,7 +589,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond_application(). @@ -603,7 +604,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStre * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_respond_all(). @@ -616,7 +617,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__ * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_ignore(). @@ -631,7 +632,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__Seekable * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_ignore_application(). @@ -646,7 +647,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStrea * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_set_metadata_ignore_all(). @@ -659,7 +660,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__S * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Get the current decoder state. * @@ -669,7 +670,7 @@ FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableS * \retval FLAC__SeekableStreamDecoderState * The current decoder state. */ -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); /** Get the state of the underlying stream decoder. * Useful when the seekable stream decoder state is @@ -681,7 +682,7 @@ FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const F * \retval FLAC__StreamDecoderState * The stream decoder state. */ -FLAC__StreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder); /** Get the "MD5 signature checking" flag. * This is the value of the setting, not whether or not the decoder is @@ -695,7 +696,7 @@ FLAC__StreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state( * \retval FLAC__bool * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_get_channels(). @@ -706,7 +707,7 @@ FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableSt * \retval unsigned * See above. */ -unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder); +FLAC_API unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_get_channel_assignment(). @@ -717,7 +718,7 @@ unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDe * \retval FLAC__ChannelAssignment * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_get_bits_per_sample(). @@ -728,7 +729,7 @@ FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(con * \retval unsigned * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_get_sample_rate(). @@ -739,7 +740,7 @@ unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableS * \retval unsigned * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_get_blocksize(). @@ -750,7 +751,7 @@ unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStrea * \retval unsigned * See above. */ -unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder); +FLAC_API unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder); /** Initialize the decoder instance. * Should be called after FLAC__seekable_stream_decoder_new() and @@ -767,7 +768,7 @@ unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamD * successful; see FLAC__SeekableStreamDecoderState for the meanings * of other return values. */ -FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -789,7 +790,7 @@ FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__Seekab * signature does not match the one computed by the decoder; else * \c true. */ -FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder); /** Flush the stream input. * The decoder's input buffer will be cleared and the state set to @@ -803,7 +804,7 @@ FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *dec * \c true if successful, else \c false if a memory allocation * or stream decoder error occurs. */ -FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder); /** Reset the decoding process. * The decoder's input buffer will be cleared and the state set to @@ -820,7 +821,7 @@ FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *deco * \c true if successful, else \c false if a memory allocation * or stream decoder error occurs. */ -FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_process_single(). @@ -831,7 +832,7 @@ FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *deco * \retval FLAC__bool * See above. */ -FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_process_until_end_of_metadata(). @@ -842,7 +843,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDeco * \retval FLAC__bool * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see * FLAC__stream_decoder_process_until_end_of_stream(). @@ -853,7 +854,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__See * \retval FLAC__bool * See above. */ -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); /** Flush the input and seek to an absolute sample. * Decoding will resume at the given sample. Note that because of @@ -866,7 +867,7 @@ FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__Seeka * \retval FLAC__bool * \c true if successful, else \c false. */ -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); /* \} */ diff --git a/include/FLAC/seekable_stream_encoder.h b/include/FLAC/seekable_stream_encoder.h index fb526433..dc73ad96 100644 --- a/include/FLAC/seekable_stream_encoder.h +++ b/include/FLAC/seekable_stream_encoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__SEEKABLE_STREAM_ENCODER_H #define FLAC__SEEKABLE_STREAM_ENCODER_H +#include "export.h" #include "stream_encoder.h" #ifdef __cplusplus @@ -148,7 +149,7 @@ typedef enum { * Using a FLAC__SeekableStreamEncoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamEncoderStateString[]; +extern FLAC_API const char * const FLAC__SeekableStreamEncoderStateString[]; /** Return values for the FLAC__SeekableStreamEncoder seek callback. @@ -168,7 +169,7 @@ typedef enum { * Using a FLAC__SeekableStreamEncoderSeekStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__SeekableStreamEncoderSeekStatusString[]; +extern FLAC_API const char * const FLAC__SeekableStreamEncoderSeekStatusString[]; /*********************************************************************** @@ -233,7 +234,7 @@ typedef FLAC__StreamEncoderWriteStatus (*FLAC__SeekableStreamEncoderWriteCallbac * \retval FLAC__SeekableStreamEncoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new(); +FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new(); /** Free an encoder instance. Deletes the object pointed to by \a encoder. * @@ -241,7 +242,7 @@ FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new(); * \assert * \code encoder != NULL \endcode */ -void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder); +FLAC_API void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder); /*********************************************************************** * @@ -260,7 +261,7 @@ void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder); * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_streamable_subset(). @@ -273,7 +274,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_do_mid_side_stereo(). @@ -286,7 +287,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStr * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_loose_mid_side_stereo(). @@ -299,7 +300,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableSt * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_channels(). @@ -312,7 +313,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__Seekabl * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_bits_per_sample(). @@ -329,7 +330,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_sample_rate(). @@ -342,7 +343,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStrea * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_blocksize(). @@ -355,7 +356,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEnc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_max_lpc_order(). @@ -368,7 +369,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_qlp_coeff_precision(). @@ -385,7 +386,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamE * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_do_qlp_coeff_prec_search(). @@ -398,7 +399,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableS * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_do_escape_coding(). @@ -411,7 +412,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__Seek * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_do_exhaustive_model_search(). @@ -424,7 +425,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStre * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_min_residual_partition_order(). @@ -437,7 +438,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__Se * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_max_residual_partition_order(). @@ -450,7 +451,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__ * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_rice_parameter_search_dist(). @@ -463,7 +464,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__ * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_total_samples_estimate(). @@ -476,7 +477,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__Se * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see * FLAC__stream_encoder_set_metadata(). @@ -508,7 +509,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__Seekab * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the seek callback. * The supplied function will be called when the encoder needs to seek @@ -527,7 +528,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the write callback. * This is inherited from FLAC__StreamEncoder; see @@ -545,7 +546,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamE * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -559,7 +560,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStream * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Get the current encoder state. * @@ -569,7 +570,7 @@ FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEnc * \retval FLAC__SeekableStreamEncoderState * The current encoder state. */ -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); /** Get the state of the underlying stream encoder. * Useful when the seekable stream encoder state is @@ -581,7 +582,7 @@ FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_get_state(const F * \retval FLAC__StreamEncoderState * The stream encoder 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); /** Get the state of the underlying stream encoder's verify decoder. * Useful when the seekable stream encoder state is @@ -594,7 +595,7 @@ FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encoder_state( * \retval FLAC__StreamDecoderState * The stream encoder state. */ -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); /** Get relevant values about the nature of a verify decoder error. * Inherited from FLAC__stream_encoder_get_verify_decoder_error_stats(). @@ -614,7 +615,7 @@ FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state( * \assert * \code encoder != NULL \endcode */ -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); /** Get the "verify" flag. * This is inherited from FLAC__StreamEncoder; see @@ -626,7 +627,7 @@ void FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(const FLAC__Se * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_verify(). */ -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); /** Get the "streamable subset" flag. * This is inherited from FLAC__StreamEncoder; see @@ -638,7 +639,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_verify(const FLAC__SeekableStreamEn * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_streamable_subset(). */ -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); /** Get the "mid/side stereo coding" flag. * This is inherited from FLAC__StreamEncoder; see @@ -650,7 +651,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_streamable_subset(const FLAC__Seeka * \retval FLAC__bool * See FLAC__seekable_stream_encoder_get_do_mid_side_stereo(). */ -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); /** Get the "adaptive mid/side switching" flag. * This is inherited from FLAC__StreamEncoder; see @@ -662,7 +663,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_do_mid_side_stereo(const FLAC__Seek * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(). */ -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); /** Get the number of input channels being processed. * This is inherited from FLAC__StreamEncoder; see @@ -674,7 +675,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(const FLAC__S * \retval unsigned * See FLAC__seekable_stream_encoder_set_channels(). */ -unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder); +FLAC_API unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder); /** Get the input sample resolution setting. * This is inherited from FLAC__StreamEncoder; see @@ -686,7 +687,7 @@ unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEn * \retval unsigned * See FLAC__seekable_stream_encoder_set_bits_per_sample(). */ -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); /** Get the input sample rate setting. * This is inherited from FLAC__StreamEncoder; see @@ -698,7 +699,7 @@ unsigned FLAC__seekable_stream_encoder_get_bits_per_sample(const FLAC__SeekableS * \retval unsigned * See FLAC__seekable_stream_encoder_set_sample_rate(). */ -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); /** Get the blocksize setting. * This is inherited from FLAC__StreamEncoder; see @@ -710,7 +711,7 @@ unsigned FLAC__seekable_stream_encoder_get_sample_rate(const FLAC__SeekableStrea * \retval unsigned * See FLAC__seekable_stream_encoder_set_blocksize(). */ -unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder); +FLAC_API unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder); /** Get the maximum LPC order setting. * This is inherited from FLAC__StreamEncoder; see @@ -722,7 +723,7 @@ unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamE * \retval unsigned * See FLAC__seekable_stream_encoder_set_max_lpc_order(). */ -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); /** Get the quantized linear predictor coefficient precision setting. * This is inherited from FLAC__StreamEncoder; see @@ -734,7 +735,7 @@ unsigned FLAC__seekable_stream_encoder_get_max_lpc_order(const FLAC__SeekableStr * \retval unsigned * See FLAC__seekable_stream_encoder_set_qlp_coeff_precision(). */ -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); /** Get the qlp coefficient precision search flag. * This is inherited from FLAC__StreamEncoder; see @@ -746,7 +747,7 @@ unsigned FLAC__seekable_stream_encoder_get_qlp_coeff_precision(const FLAC__Seeka * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(). */ -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); /** Get the "escape coding" flag. * This is inherited from FLAC__StreamEncoder; see @@ -758,7 +759,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(const FLAC * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_do_escape_coding(). */ -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); /** Get the exhaustive model search flag. * This is inherited from FLAC__StreamEncoder; see @@ -770,7 +771,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_do_escape_coding(const FLAC__Seekab * \retval FLAC__bool * See FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(). */ -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); /** Get the minimum residual partition order setting. * This is inherited from FLAC__StreamEncoder; see @@ -782,7 +783,7 @@ FLAC__bool FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(const FL * \retval unsigned * See FLAC__seekable_stream_encoder_set_min_residual_partition_order(). */ -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); /** Get maximum residual partition order setting. * This is inherited from FLAC__StreamEncoder; see @@ -794,7 +795,7 @@ unsigned FLAC__seekable_stream_encoder_get_min_residual_partition_order(const FL * \retval unsigned * See FLAC__seekable_stream_encoder_set_max_residual_partition_order(). */ -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); /** Get the Rice parameter search distance setting. * This is inherited from FLAC__StreamEncoder; see @@ -806,7 +807,7 @@ unsigned FLAC__seekable_stream_encoder_get_max_residual_partition_order(const FL * \retval unsigned * See FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(). */ -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); /** Get the previously set estimate of the total samples to be encoded. * This is inherited from FLAC__StreamEncoder; see @@ -818,7 +819,7 @@ unsigned FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(const FLAC * \retval FLAC__uint64 * See FLAC__seekable_stream_encoder_set_total_samples_estimate(). */ -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); /** Initialize the encoder instance. * Should be called after FLAC__seekable_stream_encoder_new() and @@ -838,7 +839,7 @@ FLAC__uint64 FLAC__seekable_stream_encoder_get_total_samples_estimate(const FLAC * \c FLAC__SEEKABLE_STREAM_ENCODER_OK if initialization was successful; see * FLAC__SeekableStreamEncoderState for the meanings of other return values. */ -FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder); +FLAC_API FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder); /** Finish the encoding process. * Flushes the encoding buffer, releases resources, resets the encoder @@ -854,7 +855,7 @@ FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__Seekab * \assert * \code encoder != NULL \endcode */ -void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder); +FLAC_API void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder); /** Submit data for encoding. * This is inherited from FLAC__StreamEncoder; see @@ -871,7 +872,7 @@ void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder); * encoder state with FLAC__seekable_stream_encoder_get_state() to see what * went wrong. */ -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); /** Submit data for encoding. * This is inherited from FLAC__StreamEncoder; see @@ -891,7 +892,7 @@ FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *en * encoder state with FLAC__seekable_stream_encoder_get_state() to see what * went wrong. */ -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); /* \} */ diff --git a/include/FLAC/stream_decoder.h b/include/FLAC/stream_decoder.h index c12557d5..7b242b6f 100644 --- a/include/FLAC/stream_decoder.h +++ b/include/FLAC/stream_decoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__STREAM_DECODER_H #define FLAC__STREAM_DECODER_H +#include "export.h" #include "format.h" #ifdef __cplusplus @@ -225,7 +226,7 @@ typedef enum { * Using a FLAC__StreamDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamDecoderStateString[]; +extern FLAC_API const char * const FLAC__StreamDecoderStateString[]; /** Return values for the FLAC__StreamDecoder read callback. @@ -248,7 +249,7 @@ typedef enum { * Using a FLAC__StreamDecoderReadStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamDecoderReadStatusString[]; +extern FLAC_API const char * const FLAC__StreamDecoderReadStatusString[]; /** Return values for the FLAC__StreamDecoder write callback. @@ -268,7 +269,7 @@ typedef enum { * Using a FLAC__StreamDecoderWriteStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamDecoderWriteStatusString[]; +extern FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[]; /** Possible values passed in to the FLAC__StreamDecoder error callback. @@ -291,7 +292,7 @@ typedef enum { * Using a FLAC__StreamDecoderErrorStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamDecoderErrorStatusString[]; +extern FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[]; /*********************************************************************** @@ -382,7 +383,7 @@ typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *deco * \retval FLAC__StreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__StreamDecoder *FLAC__stream_decoder_new(); +FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -390,7 +391,7 @@ FLAC__StreamDecoder *FLAC__stream_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder); +FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder); /*********************************************************************** @@ -419,7 +420,7 @@ void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder); * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Set the write callback. * The supplied function will be called when the decoder has decoded a @@ -439,7 +440,7 @@ FLAC__bool FLAC__stream_decoder_set_read_callback(FLAC__StreamDecoder *decoder, * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the metadata callback. * The supplied function will be called when the decoder has decoded a metadata @@ -467,7 +468,7 @@ FLAC__bool FLAC__stream_decoder_set_write_callback(FLAC__StreamDecoder *decoder, * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the error callback. * The supplied function will be called whenever an error occurs during @@ -485,7 +486,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_callback(FLAC__StreamDecoder *decod * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -499,7 +500,7 @@ FLAC__bool FLAC__stream_decoder_set_error_callback(FLAC__StreamDecoder *decoder, * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Direct the decoder to pass on all metadata blocks of type \a type. * @@ -513,7 +514,7 @@ FLAC__bool FLAC__stream_decoder_set_client_data(FLAC__StreamDecoder *decoder, vo * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Direct the decoder to pass on all APPLICATION metadata blocks of the * given \a id. @@ -528,7 +529,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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]); /** Direct the decoder to pass on all metadata blocks of any type. * @@ -540,7 +541,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Direct the decoder to filter out all metadata blocks of type \a type. * @@ -554,7 +555,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *de * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Direct the decoder to filter out all APPLICATION metadata blocks of * the given \a id. @@ -569,7 +570,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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]); /** Direct the decoder to filter out all metadata blocks of any type. * @@ -581,7 +582,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDeco * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Get the current decoder state. * @@ -591,7 +592,7 @@ FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *dec * \retval FLAC__StreamDecoderState * The current decoder state. */ -FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder); +FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder); /** Get the current number of channels in the stream being decoded. * Will only be valid after decoding has started and will contain the @@ -603,7 +604,7 @@ FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecode * \retval unsigned * See above. */ -unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder); +FLAC_API unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder); /** Get the current channel assignment in the stream being decoded. * Will only be valid after decoding has started and will contain the @@ -615,7 +616,7 @@ unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder); * \retval FLAC__ChannelAssignment * See above. */ -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); /** Get the current sample resolution in the stream being decoded. * Will only be valid after decoding has started and will contain the @@ -627,7 +628,7 @@ FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__ * \retval unsigned * See above. */ -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); /** Get the current sample rate in Hz of the stream being decoded. * Will only be valid after decoding has started and will contain the @@ -639,7 +640,7 @@ unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *dec * \retval unsigned * See above. */ -unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder); +FLAC_API unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder); /** Get the current blocksize of the stream being decoded. * Will only be valid after decoding has started and will contain the @@ -651,7 +652,7 @@ unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder * \retval unsigned * See above. */ -unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder); +FLAC_API unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder); /** Initialize the decoder instance. * Should be called after FLAC__stream_decoder_new() and @@ -668,7 +669,7 @@ unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder); * successful; see FLAC__StreamDecoderState for the meanings of other * return values. */ -FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder); +FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -684,7 +685,7 @@ FLAC__StreamDecoderState FLAC__stream_decoder_init(FLAC__StreamDecoder *decoder) * \assert * \code decoder != NULL \endcode */ -void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder); +FLAC_API void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder); /** Flush the stream input. * The decoder's input buffer will be cleared and the state set to @@ -697,7 +698,7 @@ void FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder); * \c true if successful, else \c false if a memory allocation * error occurs. */ -FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder); /** Reset the decoding process. * The decoder's input buffer will be cleared and the state set to @@ -713,7 +714,7 @@ FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder); * \c true if successful, else \c false if a memory allocation * error occurs. */ -FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder); /** Decode one metadata block or audio frame. * This version instructs the decoder to decode a either a single metadata @@ -739,7 +740,7 @@ FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder); * FLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder); +FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder); /** Decode until the end of the metadata. * This version instructs the decoder to decode from the current position @@ -764,7 +765,7 @@ FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder); * FLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -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); /** Decode until the end of the stream. * This version instructs the decoder to decode from the current position @@ -789,7 +790,7 @@ FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecode * FLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -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); /* \} */ diff --git a/include/FLAC/stream_encoder.h b/include/FLAC/stream_encoder.h index 6b65fc18..3fdbdc82 100644 --- a/include/FLAC/stream_encoder.h +++ b/include/FLAC/stream_encoder.h @@ -20,6 +20,7 @@ #ifndef FLAC__STREAM_ENCODER_H #define FLAC__STREAM_ENCODER_H +#include "export.h" #include "format.h" #include "stream_decoder.h" @@ -260,7 +261,7 @@ typedef enum { * Using a FLAC__StreamEncoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamEncoderStateString[]; +extern FLAC_API const char * const FLAC__StreamEncoderStateString[]; /** Return values for the FLAC__StreamEncoder write callback. */ @@ -279,7 +280,7 @@ typedef enum { * Using a FLAC__StreamEncoderWriteStatus as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const FLAC__StreamEncoderWriteStatusString[]; +extern FLAC_API const char * const FLAC__StreamEncoderWriteStatusString[]; /*********************************************************************** @@ -340,7 +341,7 @@ typedef void (*FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *e * \retval FLAC__StreamEncoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC__StreamEncoder *FLAC__stream_encoder_new(); +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(); /** Free an encoder instance. Deletes the object pointed to by \a encoder. * @@ -348,7 +349,7 @@ FLAC__StreamEncoder *FLAC__stream_encoder_new(); * \assert * \code encoder != NULL \endcode */ -void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder); +FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder); /*********************************************************************** * @@ -370,7 +371,7 @@ void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder); * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the "streamable subset" flag. If \c true, the encoder will comply * with the subset (see the format specification) and will check the @@ -388,7 +389,7 @@ FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__b * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set to \c true to enable mid-side encoding on stereo input. The * number of channels must be 2. Set to \c false to use only @@ -402,7 +403,7 @@ FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set to \c true to enable adaptive switching between mid-side and * left-right encoding on stereo input. The number of channels must @@ -417,7 +418,7 @@ FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *enco * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the number of channels to be encoded. * @@ -429,7 +430,7 @@ FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *e * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the sample resolution of the input to be encoded. * @@ -445,7 +446,7 @@ FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, unsig * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the sample rate (in Hz) of the input to be encoded. * @@ -457,7 +458,7 @@ FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the blocksize to use while encoding. * @@ -469,7 +470,7 @@ FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, un * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the maximum LPC order, or \c 0 to use only the fixed predictors. * @@ -481,7 +482,7 @@ FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, unsi * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the precision, in bits, of the quantized linear predictor * coefficients, or \c 0 to let the encoder select it based on the @@ -499,7 +500,7 @@ FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set to \c false to use only the specified quantized linear predictor * coefficient precision, or \c true to search neighboring precision @@ -513,7 +514,7 @@ FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *enc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Deprecated. Setting this value has no effect. * @@ -525,7 +526,7 @@ FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set to \c false to let the encoder estimate the best model order * based on the residual signal energy, or \c true to force the @@ -539,7 +540,7 @@ FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the minimum partition order to search when coding the residual. * This is used in tandem with @@ -562,7 +563,7 @@ FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the maximum partition order to search when coding the residual. * This is used in tandem with @@ -585,7 +586,7 @@ FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEnc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Deprecated. Setting this value has no effect. * @@ -597,7 +598,7 @@ FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEnc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set an estimate of the total samples that will be encoded. * This is merely an estimate and may be set to \c 0 if unknown. @@ -613,7 +614,7 @@ FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the metadata blocks to be emitted to the stream before encoding. * A value of \c NULL, \c 0 implies no metadata; otherwise, supply an @@ -656,7 +657,7 @@ FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder * * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Set the write callback. * The supplied function will be called by the encoder anytime there is raw @@ -683,7 +684,7 @@ FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC_ * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback value); +FLAC_API FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback value); /** Set the metadata callback. * The supplied function will be called once at the end of encoding with @@ -704,7 +705,7 @@ FLAC__bool FLAC__stream_encoder_set_write_callback(FLAC__StreamEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderMetadataCallback value); +FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderMetadataCallback value); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -718,7 +719,7 @@ FLAC__bool FLAC__stream_encoder_set_metadata_callback(FLAC__StreamEncoder *encod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Get the current encoder state. * @@ -728,7 +729,7 @@ FLAC__bool FLAC__stream_encoder_set_client_data(FLAC__StreamEncoder *encoder, vo * \retval FLAC__StreamEncoderState * The current encoder state. */ -FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder); +FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder); /** Get the state of the verify stream decoder. * Useful when the stream encoder state is @@ -740,7 +741,7 @@ FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncode * \retval FLAC__StreamDecoderState * The verify stream decoder 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); /** Get relevant values about the nature of a verify decoder error. * Useful when the stream encoder state is @@ -759,7 +760,7 @@ FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLA * \assert * \code encoder != NULL \endcode */ -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); /** Get the "verify" flag. * @@ -769,7 +770,7 @@ void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncod * \retval FLAC__bool * See FLAC__stream_encoder_set_verify(). */ -FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder); +FLAC_API FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder); /** Get the "streamable subset" flag. * @@ -779,7 +780,7 @@ FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder); * \retval FLAC__bool * See FLAC__stream_encoder_set_streamable_subset(). */ -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); /** Get the "mid/side stereo coding" flag. * @@ -789,7 +790,7 @@ FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder * \retval FLAC__bool * See FLAC__stream_encoder_get_do_mid_side_stereo(). */ -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); /** Get the "adaptive mid/side switching" flag. * @@ -799,7 +800,7 @@ FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder * \retval FLAC__bool * See FLAC__stream_encoder_set_loose_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); /** Get the number of input channels being processed. * @@ -809,7 +810,7 @@ FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEnco * \retval unsigned * See FLAC__stream_encoder_set_channels(). */ -unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder); +FLAC_API unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder); /** Get the input sample resolution setting. * @@ -819,7 +820,7 @@ unsigned FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder); * \retval unsigned * See FLAC__stream_encoder_set_bits_per_sample(). */ -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); /** Get the input sample rate setting. * @@ -829,7 +830,7 @@ unsigned FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *enc * \retval unsigned * See FLAC__stream_encoder_set_sample_rate(). */ -unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder); +FLAC_API unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder); /** Get the blocksize setting. * @@ -839,7 +840,7 @@ unsigned FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder * \retval unsigned * See FLAC__stream_encoder_set_blocksize(). */ -unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder); +FLAC_API unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder); /** Get the maximum LPC order setting. * @@ -849,7 +850,7 @@ unsigned FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder); * \retval unsigned * See FLAC__stream_encoder_set_max_lpc_order(). */ -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); /** Get the quantized linear predictor coefficient precision setting. * @@ -859,7 +860,7 @@ unsigned FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encod * \retval unsigned * See FLAC__stream_encoder_set_qlp_coeff_precision(). */ -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); /** Get the qlp coefficient precision search flag. * @@ -869,7 +870,7 @@ unsigned FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder * \retval FLAC__bool * See FLAC__stream_encoder_set_do_qlp_coeff_prec_search(). */ -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); /** Get the "escape coding" flag. * @@ -879,7 +880,7 @@ FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamE * \retval FLAC__bool * See FLAC__stream_encoder_set_do_escape_coding(). */ -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); /** Get the exhaustive model search flag. * @@ -889,7 +890,7 @@ FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder * * \retval FLAC__bool * See FLAC__stream_encoder_set_do_exhaustive_model_search(). */ -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); /** Get the minimum residual partition order setting. * @@ -899,7 +900,7 @@ FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__Strea * \retval unsigned * See FLAC__stream_encoder_set_min_residual_partition_order(). */ -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); /** Get maximum residual partition order setting. * @@ -909,7 +910,7 @@ unsigned FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__Strea * \retval unsigned * See FLAC__stream_encoder_set_max_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); /** Get the Rice parameter search distance setting. * @@ -919,7 +920,7 @@ unsigned FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__Strea * \retval unsigned * See FLAC__stream_encoder_set_rice_parameter_search_dist(). */ -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); /** Get the previously set estimate of the total samples to be encoded. * The encoder merely mimics back the value given to @@ -932,7 +933,7 @@ unsigned FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamE * \retval FLAC__uint64 * See FLAC__stream_encoder_get_total_samples_estimate(). */ -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); /** Initialize the encoder instance. * Should be called after FLAC__stream_encoder_new() and @@ -952,7 +953,7 @@ FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamE * \c FLAC__STREAM_ENCODER_OK if initialization was successful; see * FLAC__StreamEncoderState for the meanings of other return values. */ -FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder); +FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder); /** Finish the encoding process. * Flushes the encoding buffer, releases resources, resets the encoder @@ -970,7 +971,7 @@ FLAC__StreamEncoderState FLAC__stream_encoder_init(FLAC__StreamEncoder *encoder) * \assert * \code encoder != NULL \endcode */ -void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder); +FLAC_API void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder); /** Submit data for encoding. * This version allows you to supply the input data via an array of @@ -989,7 +990,7 @@ void FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder); * encoder state with FLAC__stream_encoder_get_state() to see what * went wrong. */ -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); /** Submit data for encoding. * This version allows you to supply the input data where the channels @@ -1013,7 +1014,7 @@ FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC * encoder state with FLAC__stream_encoder_get_state() to see what * went wrong. */ -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); /* \} */ diff --git a/include/OggFLAC++/all.h b/include/OggFLAC++/all.h index 6360f734..8fca5ede 100644 --- a/include/OggFLAC++/all.h +++ b/include/OggFLAC++/all.h @@ -20,6 +20,8 @@ #ifndef OggFLACPP__ALL_H #define OggFLACPP__ALL_H +#include "export.h" + #include "encoder.h" #include "decoder.h" diff --git a/include/OggFLAC++/decoder.h b/include/OggFLAC++/decoder.h index 3f320ff9..9cb59b78 100644 --- a/include/OggFLAC++/decoder.h +++ b/include/OggFLAC++/decoder.h @@ -20,6 +20,8 @@ #ifndef OggFLACPP__DECODER_H #define OggFLACPP__DECODER_H +#include "export.h" + #include "OggFLAC/stream_decoder.h" // we only need this for the state abstraction really... #include "FLAC++/decoder.h" @@ -74,9 +76,9 @@ namespace OggFLAC { /** This class wraps the ::OggFLAC__StreamDecoder. */ - class Stream { + class OggFLACPP_API Stream { public: - class State { + class OggFLACPP_API State { public: inline State(::OggFLAC__StreamDecoderState state): state_(state) { } inline operator ::OggFLAC__StreamDecoderState() const { return state_; } diff --git a/include/OggFLAC++/encoder.h b/include/OggFLAC++/encoder.h index c74f1c7c..33a2aa1e 100644 --- a/include/OggFLAC++/encoder.h +++ b/include/OggFLAC++/encoder.h @@ -20,6 +20,8 @@ #ifndef OggFLACPP__ENCODER_H #define OggFLACPP__ENCODER_H +#include "export.h" + #include "OggFLAC/stream_encoder.h" #include "decoder.h" // we only need these for the state abstractions really... @@ -76,9 +78,9 @@ namespace OggFLAC { /** This class wraps the ::OggFLAC__StreamEncoder. */ - class Stream { + class OggFLACPP_API Stream { public: - class State { + class OggFLACPP_API State { public: inline State(::OggFLAC__StreamEncoderState state): state_(state) { } inline operator ::OggFLAC__StreamEncoderState() const { return state_; } diff --git a/include/OggFLAC/all.h b/include/OggFLAC/all.h index 0f3500dd..8d40079d 100644 --- a/include/OggFLAC/all.h +++ b/include/OggFLAC/all.h @@ -24,6 +24,8 @@ * for distribution yet. */ +#include "export.h" + #include "stream_decoder.h" #include "stream_encoder.h" diff --git a/include/OggFLAC/file_decoder.h b/include/OggFLAC/file_decoder.h index 80d8499c..d1a1d27d 100644 --- a/include/OggFLAC/file_decoder.h +++ b/include/OggFLAC/file_decoder.h @@ -20,6 +20,8 @@ #ifndef OggFLAC__FILE_DECODER_H #define OggFLAC__FILE_DECODER_H +#include "export.h" + #include "FLAC/file_decoder.h" #ifdef __cplusplus @@ -88,7 +90,7 @@ typedef enum { * Using an OggFLAC__FileDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const OggFLAC__FileDecoderStateString[]; +extern OggFLAC_API const char * const OggFLAC__FileDecoderStateString[]; /*********************************************************************** @@ -126,7 +128,7 @@ typedef void (*OggFLAC__FileDecoderErrorCallback)(const OggFLAC__FileDecoder *de * \retval OggFLAC__FileDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -OggFLAC__FileDecoder *OggFLAC__file_decoder_new(); +OggFLAC_API OggFLAC__FileDecoder *OggFLAC__file_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -134,7 +136,7 @@ OggFLAC__FileDecoder *OggFLAC__file_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void OggFLAC__file_decoder_delete(OggFLAC__FileDecoder *decoder); +OggFLAC_API void OggFLAC__file_decoder_delete(OggFLAC__FileDecoder *decoder); /*********************************************************************** @@ -157,7 +159,7 @@ void OggFLAC__file_decoder_delete(OggFLAC__FileDecoder *decoder); * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_md5_checking(OggFLAC__FileDecoder *decoder, FLAC__bool value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_md5_checking(OggFLAC__FileDecoder *decoder, FLAC__bool value); /** Set the input file name to decode. * This is inherited from FLAC__FileDecoder; see @@ -173,7 +175,7 @@ FLAC__bool OggFLAC__file_decoder_set_md5_checking(OggFLAC__FileDecoder *decoder, * \c false if the decoder is already initialized, or there was a memory * allocation error, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_filename(OggFLAC__FileDecoder *decoder, const char *value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_filename(OggFLAC__FileDecoder *decoder, const char *value); /** Set the write callback. * This is inherited from FLAC__FileDecoder; see @@ -191,7 +193,7 @@ FLAC__bool OggFLAC__file_decoder_set_filename(OggFLAC__FileDecoder *decoder, con * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_write_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderWriteCallback value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_write_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderWriteCallback value); /** Set the metadata callback. * This is inherited from FLAC__FileDecoder; see @@ -209,7 +211,7 @@ FLAC__bool OggFLAC__file_decoder_set_write_callback(OggFLAC__FileDecoder *decode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderMetadataCallback value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderMetadataCallback value); /** Set the error callback. * This is inherited from FLAC__FileDecoder; see @@ -227,7 +229,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_callback(OggFLAC__FileDecoder *dec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_error_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderErrorCallback value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_error_callback(OggFLAC__FileDecoder *decoder, OggFLAC__FileDecoderErrorCallback value); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -241,7 +243,7 @@ FLAC__bool OggFLAC__file_decoder_set_error_callback(OggFLAC__FileDecoder *decode * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_client_data(OggFLAC__FileDecoder *decoder, void *value); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_client_data(OggFLAC__FileDecoder *decoder, void *value); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_respond(). @@ -256,7 +258,7 @@ FLAC__bool OggFLAC__file_decoder_set_client_data(OggFLAC__FileDecoder *decoder, * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_respond(OggFLAC__FileDecoder *decoder, OggFLAC__MetadataType type); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_respond(OggFLAC__FileDecoder *decoder, OggFLAC__MetadataType type); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_respond_application(). @@ -271,7 +273,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_respond(OggFLAC__FileDecoder *deco * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_respond_application(OggFLAC__FileDecoder *decoder, const FLAC__byte id[4]); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_respond_application(OggFLAC__FileDecoder *decoder, const FLAC__byte id[4]); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_respond_all(). @@ -284,7 +286,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_respond_application(OggFLAC__FileD * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_respond_all(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_respond_all(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_ignore(). @@ -299,7 +301,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_respond_all(OggFLAC__FileDecoder * * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_ignore(OggFLAC__FileDecoder *decoder, OggFLAC__MetadataType type); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_ignore(OggFLAC__FileDecoder *decoder, OggFLAC__MetadataType type); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_ignore_application(). @@ -314,7 +316,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_ignore(OggFLAC__FileDecoder *decod * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_application(OggFLAC__FileDecoder *decoder, const FLAC__byte id[4]); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_application(OggFLAC__FileDecoder *decoder, const FLAC__byte id[4]); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_set_metadata_ignore_all(). @@ -327,7 +329,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_application(OggFLAC__FileDe * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_all(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_all(OggFLAC__FileDecoder *decoder); /** Get the current decoder state. * @@ -337,7 +339,7 @@ FLAC__bool OggFLAC__file_decoder_set_metadata_ignore_all(OggFLAC__FileDecoder *d * \retval OggFLAC__FileDecoderState * The current decoder state. */ -OggFLAC__FileDecoderState OggFLAC__file_decoder_get_state(const OggFLAC__FileDecoder *decoder); +OggFLAC_API OggFLAC__FileDecoderState OggFLAC__file_decoder_get_state(const OggFLAC__FileDecoder *decoder); /** Get the state of the underlying FLAC file decoder. * Useful when the file decoder state is @@ -349,7 +351,7 @@ OggFLAC__FileDecoderState OggFLAC__file_decoder_get_state(const OggFLAC__FileDec * \retval FLAC__FileDecoderState * The FLAC file decoder state. */ -FLAC__FileDecoderState OggFLAC__file_decoder_get_FLAC_file_decoder_state(const OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__FileDecoderState OggFLAC__file_decoder_get_FLAC_file_decoder_state(const OggFLAC__FileDecoder *decoder); /** Get the state of the underlying FLAC file decoder's seekable stream decoder. * Useful when the file decoder state is @@ -362,7 +364,7 @@ FLAC__FileDecoderState OggFLAC__file_decoder_get_FLAC_file_decoder_state(const O * \retval FLAC__SeekableStreamDecoderState * The FLAC seekable stream decoder state. */ -FLAC__SeekableStreamDecoderState OggFLAC__file_decoder_get_FLAC_seekable_stream_decoder_state(const OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__SeekableStreamDecoderState OggFLAC__file_decoder_get_FLAC_seekable_stream_decoder_state(const OggFLAC__FileDecoder *decoder); /** Get the state of the underlying FLAC file decoder's stream decoder. * Useful when the file decoder state is @@ -376,7 +378,7 @@ FLAC__SeekableStreamDecoderState OggFLAC__file_decoder_get_FLAC_seekable_stream_ * \retval FLAC__StreamDecoderState * The FLAC stream decoder state. */ -FLAC__StreamDecoderState OggFLAC__file_decoder_get_FLAC_stream_decoder_state(const OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__StreamDecoderState OggFLAC__file_decoder_get_FLAC_stream_decoder_state(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_md5_checking(). @@ -387,7 +389,7 @@ FLAC__StreamDecoderState OggFLAC__file_decoder_get_FLAC_stream_decoder_state(con * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__file_decoder_get_md5_checking(const OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_get_md5_checking(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_channels(). @@ -398,7 +400,7 @@ FLAC__bool OggFLAC__file_decoder_get_md5_checking(const OggFLAC__FileDecoder *de * \retval unsigned * See above. */ -unsigned OggFLAC__file_decoder_get_channels(const OggFLAC__FileDecoder *decoder); +OggFLAC_API unsigned OggFLAC__file_decoder_get_channels(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_channel_assignment(). @@ -409,7 +411,7 @@ unsigned OggFLAC__file_decoder_get_channels(const OggFLAC__FileDecoder *decoder) * \retval OggFLAC__ChannelAssignment * See above. */ -OggFLAC__ChannelAssignment OggFLAC__file_decoder_get_channel_assignment(const OggFLAC__FileDecoder *decoder); +OggFLAC_API OggFLAC__ChannelAssignment OggFLAC__file_decoder_get_channel_assignment(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_bits_per_sample(). @@ -420,7 +422,7 @@ OggFLAC__ChannelAssignment OggFLAC__file_decoder_get_channel_assignment(const Og * \retval unsigned * See above. */ -unsigned OggFLAC__file_decoder_get_bits_per_sample(const OggFLAC__FileDecoder *decoder); +OggFLAC_API unsigned OggFLAC__file_decoder_get_bits_per_sample(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_sample_rate(). @@ -431,7 +433,7 @@ unsigned OggFLAC__file_decoder_get_bits_per_sample(const OggFLAC__FileDecoder *d * \retval unsigned * See above. */ -unsigned OggFLAC__file_decoder_get_sample_rate(const OggFLAC__FileDecoder *decoder); +OggFLAC_API unsigned OggFLAC__file_decoder_get_sample_rate(const OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_get_blocksize(). @@ -442,7 +444,7 @@ unsigned OggFLAC__file_decoder_get_sample_rate(const OggFLAC__FileDecoder *decod * \retval unsigned * See above. */ -unsigned OggFLAC__file_decoder_get_blocksize(const OggFLAC__FileDecoder *decoder); +OggFLAC_API unsigned OggFLAC__file_decoder_get_blocksize(const OggFLAC__FileDecoder *decoder); /** Initialize the decoder instance. * Should be called after OggFLAC__file_decoder_new() and @@ -458,7 +460,7 @@ unsigned OggFLAC__file_decoder_get_blocksize(const OggFLAC__FileDecoder *decoder * \c OggFLAC__FILE_DECODER_OK if initialization was successful; see * OggFLAC__FileDecoderState for the meanings of other return values. */ -OggFLAC__FileDecoderState OggFLAC__file_decoder_init(OggFLAC__FileDecoder *decoder); +OggFLAC_API OggFLAC__FileDecoderState OggFLAC__file_decoder_init(OggFLAC__FileDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -479,7 +481,7 @@ OggFLAC__FileDecoderState OggFLAC__file_decoder_init(OggFLAC__FileDecoder *decod * signature does not match the one computed by the decoder; else * \c true. */ -FLAC__bool OggFLAC__file_decoder_finish(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_finish(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_process_single(). @@ -490,7 +492,7 @@ FLAC__bool OggFLAC__file_decoder_finish(OggFLAC__FileDecoder *decoder); * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__file_decoder_process_single(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_process_single(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_process_until_end_of_metadata(). @@ -501,7 +503,7 @@ FLAC__bool OggFLAC__file_decoder_process_single(OggFLAC__FileDecoder *decoder); * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__file_decoder_process_until_end_of_metadata(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_process_until_end_of_metadata(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_process_until_end_of_stream(). @@ -512,7 +514,7 @@ FLAC__bool OggFLAC__file_decoder_process_until_end_of_metadata(OggFLAC__FileDeco * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__file_decoder_process_until_end_of_file(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_process_until_end_of_file(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_process_remaining_frames(). @@ -523,7 +525,7 @@ FLAC__bool OggFLAC__file_decoder_process_until_end_of_file(OggFLAC__FileDecoder * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__file_decoder_process_remaining_frames(OggFLAC__FileDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_process_remaining_frames(OggFLAC__FileDecoder *decoder); /** This is inherited from FLAC__FileDecoder; see * FLAC__file_decoder_seek_absolute(). @@ -535,7 +537,7 @@ FLAC__bool OggFLAC__file_decoder_process_remaining_frames(OggFLAC__FileDecoder * * \retval FLAC__bool * \c true if successful, else \c false. */ -FLAC__bool OggFLAC__file_decoder_seek_absolute(OggFLAC__FileDecoder *decoder, FLAC__uint64 sample); +OggFLAC_API FLAC__bool OggFLAC__file_decoder_seek_absolute(OggFLAC__FileDecoder *decoder, FLAC__uint64 sample); /* \} */ diff --git a/include/OggFLAC/seekable_stream_decoder.h b/include/OggFLAC/seekable_stream_decoder.h index 7b5f1056..7b82d5d0 100644 --- a/include/OggFLAC/seekable_stream_decoder.h +++ b/include/OggFLAC/seekable_stream_decoder.h @@ -20,6 +20,8 @@ #ifndef OggFLAC__SEEKABLE_STREAM_DECODER_H #define OggFLAC__SEEKABLE_STREAM_DECODER_H +#include "export.h" + #include "FLAC/seekable_stream_decoder.h" #ifdef __cplusplus @@ -88,7 +90,7 @@ typedef enum { * Using an OggFLAC__SeekableStreamDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const OggFLAC__SeekableStreamDecoderStateString[]; +extern OggFLAC_API const char * const OggFLAC__SeekableStreamDecoderStateString[]; /*********************************************************************** @@ -134,7 +136,7 @@ typedef void (*OggFLAC__SeekableStreamDecoderErrorCallback)(const OggFLAC__Seeka * \retval OggFLAC__SeekableStreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -OggFLAC__SeekableStreamDecoder *OggFLAC__seekable_stream_decoder_new(); +OggFLAC_API OggFLAC__SeekableStreamDecoder *OggFLAC__seekable_stream_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -142,7 +144,7 @@ OggFLAC__SeekableStreamDecoder *OggFLAC__seekable_stream_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void OggFLAC__seekable_stream_decoder_delete(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API void OggFLAC__seekable_stream_decoder_delete(OggFLAC__SeekableStreamDecoder *decoder); /*********************************************************************** @@ -165,7 +167,7 @@ void OggFLAC__seekable_stream_decoder_delete(OggFLAC__SeekableStreamDecoder *dec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_md5_checking(OggFLAC__SeekableStreamDecoder *decoder, FLAC__bool value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_md5_checking(OggFLAC__SeekableStreamDecoder *decoder, FLAC__bool value); /** Set the read callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -183,7 +185,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_md5_checking(OggFLAC__SeekableSt * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_read_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderReadCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_read_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderReadCallback value); /** Set the seek callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -201,7 +203,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_read_callback(OggFLAC__SeekableS * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_seek_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderSeekCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_seek_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderSeekCallback value); /** Set the tell callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -219,7 +221,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_seek_callback(OggFLAC__SeekableS * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_tell_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderTellCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_tell_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderTellCallback value); /** Set the length callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -237,7 +239,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_tell_callback(OggFLAC__SeekableS * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_length_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderLengthCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_length_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderLengthCallback value); /** Set the eof callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -255,7 +257,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_length_callback(OggFLAC__Seekabl * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_eof_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderEofCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_eof_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderEofCallback value); /** Set the write callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -273,7 +275,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_eof_callback(OggFLAC__SeekableSt * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_write_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderWriteCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_write_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderWriteCallback value); /** Set the metadata callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -291,7 +293,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_write_callback(OggFLAC__Seekable * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderMetadataCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderMetadataCallback value); /** Set the error callback. * This is inherited from FLAC__SeekableStreamDecoder; see @@ -309,7 +311,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_callback(OggFLAC__Seeka * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_error_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderErrorCallback value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_error_callback(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__SeekableStreamDecoderErrorCallback value); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -323,7 +325,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_error_callback(OggFLAC__Seekable * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_client_data(OggFLAC__SeekableStreamDecoder *decoder, void *value); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_client_data(OggFLAC__SeekableStreamDecoder *decoder, void *value); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond(). @@ -338,7 +340,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_client_data(OggFLAC__SeekableStr * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__MetadataType type); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__MetadataType type); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond_application(). @@ -353,7 +355,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond(OggFLAC__Seekab * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_application(OggFLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_application(OggFLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_respond_all(). @@ -366,7 +368,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_application(Ogg * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_all(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_all(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore(). @@ -381,7 +383,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_respond_all(OggFLAC__Se * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__MetadataType type); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore(OggFLAC__SeekableStreamDecoder *decoder, OggFLAC__MetadataType type); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore_application(). @@ -396,7 +398,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore(OggFLAC__Seekabl * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_application(OggFLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_application(OggFLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_set_metadata_ignore_all(). @@ -409,7 +411,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_application(OggF * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_all(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_all(OggFLAC__SeekableStreamDecoder *decoder); /** Get the current decoder state. * @@ -419,7 +421,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_set_metadata_ignore_all(OggFLAC__See * \retval OggFLAC__SeekableStreamDecoderState * The current decoder state. */ -OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_state(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_state(const OggFLAC__SeekableStreamDecoder *decoder); /** Get the state of the underlying FLAC seekable stream decoder. * Useful when the seekable stream decoder state is @@ -431,7 +433,7 @@ OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_state(c * \retval FLAC__SeekableStreamDecoderState * The FLAC seekable stream decoder state. */ -FLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_seekable_stream_decoder_state(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_seekable_stream_decoder_state(const OggFLAC__SeekableStreamDecoder *decoder); /** Get the state of the underlying FLAC seekable stream decoder's stream decoder. * Useful when the seekable stream decoder state is @@ -444,7 +446,7 @@ FLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_seeka * \retval FLAC__StreamDecoderState * The FLAC stream decoder state. */ -FLAC__StreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_stream_decoder_state(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__StreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_stream_decoder_state(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_md5_checking(). @@ -455,7 +457,7 @@ FLAC__StreamDecoderState OggFLAC__seekable_stream_decoder_get_FLAC_stream_decode * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__seekable_stream_decoder_get_md5_checking(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_get_md5_checking(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_channels(). @@ -466,7 +468,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_get_md5_checking(const OggFLAC__Seek * \retval unsigned * See above. */ -unsigned OggFLAC__seekable_stream_decoder_get_channels(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__seekable_stream_decoder_get_channels(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_channel_assignment(). @@ -477,7 +479,7 @@ unsigned OggFLAC__seekable_stream_decoder_get_channels(const OggFLAC__SeekableSt * \retval OggFLAC__ChannelAssignment * See above. */ -OggFLAC__ChannelAssignment OggFLAC__seekable_stream_decoder_get_channel_assignment(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API OggFLAC__ChannelAssignment OggFLAC__seekable_stream_decoder_get_channel_assignment(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_bits_per_sample(). @@ -488,7 +490,7 @@ OggFLAC__ChannelAssignment OggFLAC__seekable_stream_decoder_get_channel_assignme * \retval unsigned * See above. */ -unsigned OggFLAC__seekable_stream_decoder_get_bits_per_sample(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__seekable_stream_decoder_get_bits_per_sample(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_sample_rate(). @@ -499,7 +501,7 @@ unsigned OggFLAC__seekable_stream_decoder_get_bits_per_sample(const OggFLAC__See * \retval unsigned * See above. */ -unsigned OggFLAC__seekable_stream_decoder_get_sample_rate(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__seekable_stream_decoder_get_sample_rate(const OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_get_blocksize(). @@ -510,7 +512,7 @@ unsigned OggFLAC__seekable_stream_decoder_get_sample_rate(const OggFLAC__Seekabl * \retval unsigned * See above. */ -unsigned OggFLAC__seekable_stream_decoder_get_blocksize(const OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__seekable_stream_decoder_get_blocksize(const OggFLAC__SeekableStreamDecoder *decoder); /** Initialize the decoder instance. * Should be called after OggFLAC__seekable_stream_decoder_new() and @@ -527,7 +529,7 @@ unsigned OggFLAC__seekable_stream_decoder_get_blocksize(const OggFLAC__SeekableS * successful; see OggFLAC__SeekableStreamDecoderState for the meanings * of other return values. */ -OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_init(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_init(OggFLAC__SeekableStreamDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -549,7 +551,7 @@ OggFLAC__SeekableStreamDecoderState OggFLAC__seekable_stream_decoder_init(OggFLA * signature does not match the one computed by the decoder; else * \c true. */ -FLAC__bool OggFLAC__seekable_stream_decoder_finish(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_finish(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_flush(). @@ -561,7 +563,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_finish(OggFLAC__SeekableStreamDecode * \c true if successful, else \c false if a memory allocation * or stream decoder error occurs. */ -FLAC__bool OggFLAC__seekable_stream_decoder_flush(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_flush(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_reset(). @@ -573,7 +575,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_flush(OggFLAC__SeekableStreamDecoder * \c true if successful, else \c false if a memory allocation * or stream decoder error occurs. */ -FLAC__bool OggFLAC__seekable_stream_decoder_reset(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_reset(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_single(). @@ -584,7 +586,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_reset(OggFLAC__SeekableStreamDecoder * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__seekable_stream_decoder_process_single(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_process_single(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_until_end_of_metadata(). @@ -595,7 +597,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_process_single(OggFLAC__SeekableStre * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_metadata(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_metadata(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_process_until_end_of_stream(). @@ -606,7 +608,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_metadata(OggFLA * \retval FLAC__bool * See above. */ -FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_stream(OggFLAC__SeekableStreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_stream(OggFLAC__SeekableStreamDecoder *decoder); /** This is inherited from FLAC__SeekableStreamDecoder; see * FLAC__seekable_stream_decoder_seek_absolute(). @@ -618,7 +620,7 @@ FLAC__bool OggFLAC__seekable_stream_decoder_process_until_end_of_stream(OggFLAC_ * \retval FLAC__bool * \c true if successful, else \c false. */ -FLAC__bool OggFLAC__seekable_stream_decoder_seek_absolute(OggFLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample); +OggFLAC_API FLAC__bool OggFLAC__seekable_stream_decoder_seek_absolute(OggFLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample); /* \} */ diff --git a/include/OggFLAC/stream_decoder.h b/include/OggFLAC/stream_decoder.h index fb0cbecd..19f522e5 100644 --- a/include/OggFLAC/stream_decoder.h +++ b/include/OggFLAC/stream_decoder.h @@ -20,6 +20,8 @@ #ifndef OggFLAC__STREAM_DECODER_H #define OggFLAC__STREAM_DECODER_H +#include "export.h" + #include "FLAC/stream_decoder.h" #ifdef __cplusplus @@ -105,7 +107,7 @@ typedef enum { * Using an OggFLAC__StreamDecoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const OggFLAC__StreamDecoderStateString[]; +extern OggFLAC_API const char * const OggFLAC__StreamDecoderStateString[]; /*********************************************************************** @@ -190,7 +192,7 @@ typedef void (*OggFLAC__StreamDecoderErrorCallback)(const OggFLAC__StreamDecoder * \retval OggFLAC__StreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new(); +OggFLAC_API OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new(); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * @@ -198,7 +200,7 @@ OggFLAC__StreamDecoder *OggFLAC__stream_decoder_new(); * \assert * \code decoder != NULL \endcode */ -void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder); +OggFLAC_API void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder); /*********************************************************************** @@ -222,7 +224,7 @@ void OggFLAC__stream_decoder_delete(OggFLAC__StreamDecoder *decoder); * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Set the write callback. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_write_callback() @@ -239,7 +241,7 @@ FLAC__bool OggFLAC__stream_decoder_set_read_callback(OggFLAC__StreamDecoder *dec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the metadata callback. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_metadata_callback() @@ -256,7 +258,7 @@ FLAC__bool OggFLAC__stream_decoder_set_write_callback(OggFLAC__StreamDecoder *de * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the error callback. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_error_callback() @@ -273,7 +275,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_callback(OggFLAC__StreamDecoder * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -287,7 +289,7 @@ FLAC__bool OggFLAC__stream_decoder_set_error_callback(OggFLAC__StreamDecoder *de * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Set the serial number for the Ogg stream. * The default behavior is to use the serial number of the first Ogg @@ -302,7 +304,7 @@ FLAC__bool OggFLAC__stream_decoder_set_client_data(OggFLAC__StreamDecoder *decod * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *decoder, long serial_number); +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *decoder, long serial_number); /** Direct the decoder to pass on all metadata blocks of type \a type. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_metadata_respond() @@ -317,7 +319,7 @@ FLAC__bool OggFLAC__stream_decoder_set_serial_number(OggFLAC__StreamDecoder *dec * \retval FLAC__bool * \c false if the decoder is already initialized, else \c 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); /** Direct the decoder to pass on all APPLICATION metadata blocks of the * given \a id. @@ -333,7 +335,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond(OggFLAC__StreamDecoder * * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** Direct the decoder to pass on all metadata blocks of any type. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_metadata_respond_all() @@ -346,7 +348,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_application(OggFLAC__Str * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Direct the decoder to filter out all metadata blocks of type \a type. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_metadata_ignore() @@ -361,7 +363,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_respond_all(OggFLAC__StreamDecod * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Direct the decoder to filter out all APPLICATION metadata blocks of * the given \a id. @@ -377,7 +379,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore(OggFLAC__StreamDecoder *d * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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]); /** Direct the decoder to filter out all metadata blocks of any type. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_set_metadata_ignore_all() @@ -390,7 +392,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_application(OggFLAC__Stre * \retval FLAC__bool * \c false if the decoder is already initialized, else \c true. */ -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); /** Get the current decoder state. * @@ -400,7 +402,7 @@ FLAC__bool OggFLAC__stream_decoder_set_metadata_ignore_all(OggFLAC__StreamDecode * \retval OggFLAC__StreamDecoderState * The current decoder state. */ -OggFLAC__StreamDecoderState OggFLAC__stream_decoder_get_state(const OggFLAC__StreamDecoder *decoder); +OggFLAC_API OggFLAC__StreamDecoderState OggFLAC__stream_decoder_get_state(const OggFLAC__StreamDecoder *decoder); /** Get the state of the underlying FLAC stream decoder. * Useful when the stream decoder state is @@ -412,7 +414,7 @@ OggFLAC__StreamDecoderState OggFLAC__stream_decoder_get_state(const OggFLAC__Str * \retval FLAC__StreamDecoderState * The FLAC stream decoder 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); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_get_channels() * @@ -422,7 +424,7 @@ FLAC__StreamDecoderState OggFLAC__stream_decoder_get_FLAC_stream_decoder_state(c * \retval unsigned * See above. */ -unsigned OggFLAC__stream_decoder_get_channels(const OggFLAC__StreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__stream_decoder_get_channels(const OggFLAC__StreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_get_channel_assignment() * @@ -432,7 +434,7 @@ unsigned OggFLAC__stream_decoder_get_channels(const OggFLAC__StreamDecoder *deco * \retval OggFLAC__ChannelAssignment * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_get_bits_per_sample() * @@ -442,7 +444,7 @@ FLAC__ChannelAssignment OggFLAC__stream_decoder_get_channel_assignment(const Ogg * \retval unsigned * See above. */ -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); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_get_sample_rate() * @@ -452,7 +454,7 @@ unsigned OggFLAC__stream_decoder_get_bits_per_sample(const OggFLAC__StreamDecode * \retval unsigned * See above. */ -unsigned OggFLAC__stream_decoder_get_sample_rate(const OggFLAC__StreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__stream_decoder_get_sample_rate(const OggFLAC__StreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_get_blocksize() * @@ -462,7 +464,7 @@ unsigned OggFLAC__stream_decoder_get_sample_rate(const OggFLAC__StreamDecoder *d * \retval unsigned * See above. */ -unsigned OggFLAC__stream_decoder_get_blocksize(const OggFLAC__StreamDecoder *decoder); +OggFLAC_API unsigned OggFLAC__stream_decoder_get_blocksize(const OggFLAC__StreamDecoder *decoder); /** Initialize the decoder instance. * Should be called after OggFLAC__stream_decoder_new() and @@ -479,7 +481,7 @@ unsigned OggFLAC__stream_decoder_get_blocksize(const OggFLAC__StreamDecoder *dec * successful; see OggFLAC__StreamDecoderState for the meanings of other * return values. */ -OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder *decoder); +OggFLAC_API OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder *decoder); /** Finish the decoding process. * Flushes the decoding buffer, releases resources, resets the decoder @@ -495,7 +497,7 @@ OggFLAC__StreamDecoderState OggFLAC__stream_decoder_init(OggFLAC__StreamDecoder * \assert * \code decoder != NULL \endcode */ -void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder); +OggFLAC_API void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_flush() * @@ -506,7 +508,7 @@ void OggFLAC__stream_decoder_finish(OggFLAC__StreamDecoder *decoder); * \c true if successful, else \c false if a memory allocation * error occurs. */ -FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder); /** This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_reset() * @@ -517,7 +519,7 @@ FLAC__bool OggFLAC__stream_decoder_flush(OggFLAC__StreamDecoder *decoder); * \c true if successful, else \c false if a memory allocation * error occurs. */ -FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder); /** Decode one metadata block or audio frame. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_single() @@ -534,7 +536,7 @@ FLAC__bool OggFLAC__stream_decoder_reset(OggFLAC__StreamDecoder *decoder); * OggFLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decoder); +OggFLAC_API FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decoder); /** Decode until the end of the metadata. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_until_end_of_metadata() @@ -551,7 +553,7 @@ FLAC__bool OggFLAC__stream_decoder_process_single(OggFLAC__StreamDecoder *decode * OggFLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -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); /** Decode until the end of the stream. * This is inherited from FLAC__StreamDecoder; see FLAC__stream_decoder_process_until_end_of_stream() @@ -568,7 +570,7 @@ FLAC__bool OggFLAC__stream_decoder_process_until_end_of_metadata(OggFLAC__Stream * OggFLAC__stream_decoder_get_state() to see what went wrong or to * check for lost synchronization (a sign of stream corruption). */ -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); /* \} */ diff --git a/include/OggFLAC/stream_encoder.h b/include/OggFLAC/stream_encoder.h index 017077b2..b197271c 100644 --- a/include/OggFLAC/stream_encoder.h +++ b/include/OggFLAC/stream_encoder.h @@ -20,6 +20,8 @@ #ifndef OggFLAC__STREAM_ENCODER_H #define OggFLAC__STREAM_ENCODER_H +#include "export.h" + #include "FLAC/stream_encoder.h" #ifdef __cplusplus @@ -102,7 +104,7 @@ typedef enum { * Using an OggFLAC__StreamEncoderState as the index to this array * will give the string equivalent. The contents should not be modified. */ -extern const char * const OggFLAC__StreamEncoderStateString[]; +extern OggFLAC_API const char * const OggFLAC__StreamEncoderStateString[]; /*********************************************************************** @@ -154,7 +156,7 @@ typedef FLAC__StreamEncoderWriteStatus (*OggFLAC__StreamEncoderWriteCallback)(co * \retval OggFLAC__StreamEncoder* * \c NULL if there was an error allocating memory, else the new instance. */ -OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new(); +OggFLAC_API OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new(); /** Free an encoder instance. Deletes the object pointed to by \a encoder. * @@ -162,7 +164,7 @@ OggFLAC__StreamEncoder *OggFLAC__stream_encoder_new(); * \assert * \code encoder != NULL \endcode */ -void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder); +OggFLAC_API void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder); /*********************************************************************** @@ -181,7 +183,7 @@ void OggFLAC__stream_encoder_delete(OggFLAC__StreamEncoder *encoder); * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *encoder, long serial_number); +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *encoder, long serial_number); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_verify() * @@ -193,7 +195,7 @@ FLAC__bool OggFLAC__stream_encoder_set_serial_number(OggFLAC__StreamEncoder *enc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_streamable_subset() * @@ -205,7 +207,7 @@ FLAC__bool OggFLAC__stream_encoder_set_verify(OggFLAC__StreamEncoder *encoder, F * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_mid_side_stereo() * @@ -217,7 +219,7 @@ FLAC__bool OggFLAC__stream_encoder_set_streamable_subset(OggFLAC__StreamEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_loose_mid_side_stereo() * @@ -229,7 +231,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_mid_side_stereo(OggFLAC__StreamEncoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_channels() * @@ -241,7 +243,7 @@ FLAC__bool OggFLAC__stream_encoder_set_loose_mid_side_stereo(OggFLAC__StreamEnco * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_bits_per_sample() * @@ -253,7 +255,7 @@ FLAC__bool OggFLAC__stream_encoder_set_channels(OggFLAC__StreamEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_sample_rate() * @@ -265,7 +267,7 @@ FLAC__bool OggFLAC__stream_encoder_set_bits_per_sample(OggFLAC__StreamEncoder *e * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_blocksize() * @@ -277,7 +279,7 @@ FLAC__bool OggFLAC__stream_encoder_set_sample_rate(OggFLAC__StreamEncoder *encod * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_max_lpc_order() * @@ -289,7 +291,7 @@ FLAC__bool OggFLAC__stream_encoder_set_blocksize(OggFLAC__StreamEncoder *encoder * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_qlp_coeff_precision() * @@ -301,7 +303,7 @@ FLAC__bool OggFLAC__stream_encoder_set_max_lpc_order(OggFLAC__StreamEncoder *enc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_qlp_coeff_prec_search() * @@ -313,7 +315,7 @@ FLAC__bool OggFLAC__stream_encoder_set_qlp_coeff_precision(OggFLAC__StreamEncode * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_escape_coding() * @@ -325,7 +327,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(OggFLAC__StreamE * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_exhaustive_model_search() * @@ -337,7 +339,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_escape_coding(OggFLAC__StreamEncoder * * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_min_residual_partition_order() * @@ -349,7 +351,7 @@ FLAC__bool OggFLAC__stream_encoder_set_do_exhaustive_model_search(OggFLAC__Strea * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_max_residual_partition_order() * @@ -361,7 +363,7 @@ FLAC__bool OggFLAC__stream_encoder_set_min_residual_partition_order(OggFLAC__Str * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_rice_parameter_search_dist() * @@ -373,7 +375,7 @@ FLAC__bool OggFLAC__stream_encoder_set_max_residual_partition_order(OggFLAC__Str * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_total_samples_estimate() * @@ -385,7 +387,7 @@ FLAC__bool OggFLAC__stream_encoder_set_rice_parameter_search_dist(OggFLAC__Strea * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_metadata() * @@ -398,7 +400,7 @@ FLAC__bool OggFLAC__stream_encoder_set_total_samples_estimate(OggFLAC__StreamEnc * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the write callback. * This is inherited from FLAC__StreamEncoder; see @@ -423,7 +425,7 @@ FLAC__bool OggFLAC__stream_encoder_set_metadata(OggFLAC__StreamEncoder *encoder, * \retval FLAC__bool * \c false if the encoder is already initialized, else \c true. */ -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); /** Set the client data to be passed back to callbacks. * This value will be supplied to callbacks in their \a client_data @@ -437,7 +439,7 @@ FLAC__bool OggFLAC__stream_encoder_set_write_callback(OggFLAC__StreamEncoder *en * \retval FLAC__bool * \c false if the encoder is already initialized, else \c 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); /** Get the current encoder state. * @@ -447,7 +449,7 @@ FLAC__bool OggFLAC__stream_encoder_set_client_data(OggFLAC__StreamEncoder *encod * \retval OggFLAC__StreamEncoderState * The current encoder state. */ -OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__StreamEncoder *encoder); +OggFLAC_API OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__StreamEncoder *encoder); /** Get the state of the underlying FLAC stream encoder. * Useful when the stream encoder state is @@ -459,7 +461,7 @@ OggFLAC__StreamEncoderState OggFLAC__stream_encoder_get_state(const OggFLAC__Str * \retval FLAC__StreamEncoderState * The FLAC stream encoder 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); /** Get the state of the underlying FLAC stream encoder's verify decoder. * Useful when the stream encoder state is @@ -472,7 +474,7 @@ FLAC__StreamEncoderState OggFLAC__stream_encoder_get_FLAC_stream_encoder_state(c * \retval FLAC__StreamDecoderState * The FLAC verify decoder state. */ -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); /** Get relevant values about the nature of a verify decoder error. * Inherited from FLAC__stream_encoder_get_verify_decoder_error_stats(). @@ -497,7 +499,7 @@ FLAC__StreamDecoderState OggFLAC__stream_encoder_get_verify_decoder_state(const * \code sample != NULL \endcode * \code expected != NULL \endcode */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_verify() * @@ -507,7 +509,7 @@ void OggFLAC__stream_encoder_get_verify_decoder_error_stats(const OggFLAC__Strea * \retval FLAC__bool * See OggFLAC__stream_encoder_set_verify(). */ -FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *encoder); +OggFLAC_API FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *encoder); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_streamable_subset() * @@ -517,7 +519,7 @@ FLAC__bool OggFLAC__stream_encoder_get_verify(const OggFLAC__StreamEncoder *enco * \retval FLAC__bool * See OggFLAC__stream_encoder_set_streamable_subset(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_mid_side_stereo() * @@ -527,7 +529,7 @@ FLAC__bool OggFLAC__stream_encoder_get_streamable_subset(const OggFLAC__StreamEn * \retval FLAC__bool * See OggFLAC__stream_encoder_get_do_mid_side_stereo(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_loose_mid_side_stereo() * @@ -537,7 +539,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_mid_side_stereo(const OggFLAC__StreamE * \retval FLAC__bool * See OggFLAC__stream_encoder_set_loose_mid_side_stereo(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_channels() * @@ -547,7 +549,7 @@ FLAC__bool OggFLAC__stream_encoder_get_loose_mid_side_stereo(const OggFLAC__Stre * \retval unsigned * See OggFLAC__stream_encoder_set_channels(). */ -unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *encoder); +OggFLAC_API unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *encoder); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_bits_per_sample() * @@ -557,7 +559,7 @@ unsigned OggFLAC__stream_encoder_get_channels(const OggFLAC__StreamEncoder *enco * \retval unsigned * See OggFLAC__stream_encoder_set_bits_per_sample(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_sample_rate() * @@ -567,7 +569,7 @@ unsigned OggFLAC__stream_encoder_get_bits_per_sample(const OggFLAC__StreamEncode * \retval unsigned * See OggFLAC__stream_encoder_set_sample_rate(). */ -unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *encoder); +OggFLAC_API unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *encoder); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_blocksize() * @@ -577,7 +579,7 @@ unsigned OggFLAC__stream_encoder_get_sample_rate(const OggFLAC__StreamEncoder *e * \retval unsigned * See OggFLAC__stream_encoder_set_blocksize(). */ -unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *encoder); +OggFLAC_API unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *encoder); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_max_lpc_order() * @@ -587,7 +589,7 @@ unsigned OggFLAC__stream_encoder_get_blocksize(const OggFLAC__StreamEncoder *enc * \retval unsigned * See OggFLAC__stream_encoder_set_max_lpc_order(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_qlp_coeff_precision() * @@ -597,7 +599,7 @@ unsigned OggFLAC__stream_encoder_get_max_lpc_order(const OggFLAC__StreamEncoder * \retval unsigned * See OggFLAC__stream_encoder_set_qlp_coeff_precision(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_qlp_coeff_prec_search() * @@ -607,7 +609,7 @@ unsigned OggFLAC__stream_encoder_get_qlp_coeff_precision(const OggFLAC__StreamEn * \retval FLAC__bool * See OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_escape_coding() * @@ -617,7 +619,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_qlp_coeff_prec_search(const OggFLAC__S * \retval FLAC__bool * See OggFLAC__stream_encoder_set_do_escape_coding(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_exhaustive_model_search() * @@ -627,7 +629,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_escape_coding(const OggFLAC__StreamEnc * \retval FLAC__bool * See OggFLAC__stream_encoder_set_do_exhaustive_model_search(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_min_residual_partition_order() * @@ -637,7 +639,7 @@ FLAC__bool OggFLAC__stream_encoder_get_do_exhaustive_model_search(const OggFLAC_ * \retval unsigned * See OggFLAC__stream_encoder_set_min_residual_partition_order(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_man_residual_partition_order() * @@ -647,7 +649,7 @@ unsigned OggFLAC__stream_encoder_get_min_residual_partition_order(const OggFLAC_ * \retval unsigned * See OggFLAC__stream_encoder_set_max_residual_partition_order(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_rice_parameter_search_dist() * @@ -657,7 +659,7 @@ unsigned OggFLAC__stream_encoder_get_max_residual_partition_order(const OggFLAC_ * \retval unsigned * See OggFLAC__stream_encoder_set_rice_parameter_search_dist(). */ -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); /** This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_total_samples_estimate() * @@ -667,7 +669,7 @@ unsigned OggFLAC__stream_encoder_get_rice_parameter_search_dist(const OggFLAC__S * \retval FLAC__uint64 * See OggFLAC__stream_encoder_get_total_samples_estimate(). */ -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); /** Initialize the encoder instance. * Should be called after OggFLAC__stream_encoder_new() and @@ -687,7 +689,7 @@ FLAC__uint64 OggFLAC__stream_encoder_get_total_samples_estimate(const OggFLAC__S * \c OggFLAC__STREAM_ENCODER_OK if initialization was successful; see * OggFLAC__StreamEncoderState for the meanings of other return values. */ -OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder *encoder); +OggFLAC_API OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder *encoder); /** Finish the encoding process. * Flushes the encoding buffer, releases resources, resets the encoder @@ -704,7 +706,7 @@ OggFLAC__StreamEncoderState OggFLAC__stream_encoder_init(OggFLAC__StreamEncoder * \assert * \code encoder != NULL \endcode */ -void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder); +OggFLAC_API void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder); /** Submit data for encoding. * This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_process(). @@ -720,7 +722,7 @@ void OggFLAC__stream_encoder_finish(OggFLAC__StreamEncoder *encoder); * encoder state with OggFLAC__stream_encoder_get_state() to see what * went wrong. */ -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); /** Submit data for encoding. * This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_process_interleaved(). @@ -739,7 +741,7 @@ FLAC__bool OggFLAC__stream_encoder_process(OggFLAC__StreamEncoder *encoder, cons * encoder state with OggFLAC__stream_encoder_get_state() to see what * went wrong. */ -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); /* \} */ diff --git a/include/share/getopt.h b/include/share/getopt.h index cf454f39..0cb909a1 100644 --- a/include/share/getopt.h +++ b/include/share/getopt.h @@ -34,6 +34,23 @@ #ifndef FLAC__SHARE__GETOPT_H #define FLAC__SHARE__GETOPT_H +#if defined(unix) || defined(__CYGWIN__) || defined(__CYGWIN32__) +#define GETOPT_API + +#else + +#ifdef GETOPT_API_EXPORTS +#define GETOPT_API _declspec(dllexport) +#else +#define GETOPT_API _declspec(dllimport) +#define __LIBNAME__ "getopt.lib" +#pragma comment(lib, __LIBNAME__) +#undef __LIBNAME__ + +#endif +#endif + + /*[JEC] was:#ifndef __need_getopt*/ /*[JEC] was:# define _GETOPT_H 1*/ /*[JEC] was:#endif*/ @@ -48,7 +65,7 @@ extern "C" { Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -extern char *FLAC__share__optarg; +GETOPT_API extern char *FLAC__share__optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -62,16 +79,16 @@ extern char *FLAC__share__optarg; Otherwise, `FLAC__share__optind' communicates from one call to the next how much of ARGV has been scanned so far. */ -extern int FLAC__share__optind; +GETOPT_API extern int FLAC__share__optind; /* Callers store zero here to inhibit the error message `FLAC__share__getopt' prints for unrecognized options. */ -extern int FLAC__share__opterr; +GETOPT_API extern int FLAC__share__opterr; /* Set to an option character which was unrecognized. */ -extern int FLAC__share__optopt; +GETOPT_API extern int FLAC__share__optopt; /*[JEC] was:#ifndef __need_getopt */ /* Describe the long-named options requested by the application. @@ -146,20 +163,20 @@ struct FLAC__share__option /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int FLAC__share__getopt (int __argc, char *const *__argv, const char *__shortopts); +GETOPT_API extern int FLAC__share__getopt (int __argc, char *const *__argv, const char *__shortopts); /*[JEC] was:# else*/ /* not __GNU_LIBRARY__ */ /*[JEC] was:extern int getopt ();*/ /*[JEC] was:# endif*/ /* __GNU_LIBRARY__ */ /*[JEC] was:# ifndef __need_getopt*/ -extern int FLAC__share__getopt_long (int __argc, char *const *__argv, const char *__shortopts, +GETOPT_API extern int FLAC__share__getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct FLAC__share__option *__longopts, int *__longind); -extern int FLAC__share__getopt_long_only (int __argc, char *const *__argv, +GETOPT_API extern int FLAC__share__getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct FLAC__share__option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ -extern int FLAC__share___getopt_internal (int __argc, char *const *__argv, +GETOPT_API extern int FLAC__share___getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct FLAC__share__option *__longopts, int *__longind, int __long_only); diff --git a/include/share/utf8.h b/include/share/utf8.h index 465fd82b..38190f10 100644 --- a/include/share/utf8.h +++ b/include/share/utf8.h @@ -1,3 +1,22 @@ +#ifndef FLAC__SHARE__UTF8_H +#define FLAC__SHARE__UTF8_H + +#if defined(unix) || defined(__CYGWIN__) || defined(__CYGWIN32__) +#define UTF8_API + +#else + +#ifdef UTF8_API_EXPORTS +#define UTF8_API _declspec(dllexport) +#else +#define UTF8_API _declspec(dllimport) +#define __LIBNAME__ "utf8.lib" +#pragma comment(lib, __LIBNAME__) +#undef __LIBNAME__ + +#endif +#endif + /* * Convert a string between UTF-8 and the locale's charset. @@ -17,7 +36,9 @@ * 3 : unknown encoding (but still converted, using '?') */ -void convert_set_charset(const char *charset); +UTF8_API void convert_set_charset(const char *charset); + +UTF8_API int utf8_encode(const char *from, char **to); +UTF8_API int utf8_decode(const char *from, char **to); -int utf8_encode(const char *from, char **to); -int utf8_decode(const char *from, char **to); +#endif |