diff --git a/include/FLAC/file_decoder.h b/include/FLAC/file_decoder.h index 47484157..c92cfc1f 100644 --- a/include/FLAC/file_decoder.h +++ b/include/FLAC/file_decoder.h @@ -451,7 +451,17 @@ FLAC_API FLAC__SeekableStreamDecoderState FLAC__file_decoder_get_seekable_stream */ FLAC_API FLAC__StreamDecoderState FLAC__file_decoder_get_stream_decoder_state(const FLAC__FileDecoder *decoder); -/*@@@@ document */ +/** Get the current decoder state as a C string. + * This version automatically resolves + * \c FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR by getting the + * seekable stream decoder's state. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval const char * + * The decoder state as a C string. Do not modify the contents. + */ FLAC_API const char *FLAC__file_decoder_get_resolved_state_string(const FLAC__FileDecoder *decoder); /** Get the "MD5 signature checking" flag. @@ -521,7 +531,18 @@ FLAC_API unsigned FLAC__file_decoder_get_sample_rate(const FLAC__FileDecoder *de */ FLAC_API unsigned FLAC__file_decoder_get_blocksize(const FLAC__FileDecoder *decoder); -/*@@@@ document */ +/** This is inherited from FLAC__SeekableStreamDecoder; see + * FLAC__seekable_stream_decoder_get_decode_position(). + * + * \param decoder A decoder instance to query. + * \param position Address at which to return the desired position. + * \assert + * \code decoder != NULL \endcode + * \code position != NULL \endcode + * \retval FLAC__bool + * \c true if successful, \c false if there was an error from + * the 'tell' callback. + */ FLAC_API FLAC__bool FLAC__file_decoder_get_decode_position(const FLAC__FileDecoder *decoder, FLAC__uint64 *position); /** Initialize the decoder instance. diff --git a/include/FLAC/file_encoder.h b/include/FLAC/file_encoder.h index ce9b9823..45a1d05a 100644 --- a/include/FLAC/file_encoder.h +++ b/include/FLAC/file_encoder.h @@ -542,7 +542,17 @@ FLAC_API FLAC__StreamEncoderState FLAC__file_encoder_get_stream_encoder_state(co */ FLAC_API FLAC__StreamDecoderState FLAC__file_encoder_get_verify_decoder_state(const FLAC__FileEncoder *encoder); -/*@@@@ document */ +/** Get the current encoder state as a C string. + * This version automatically resolves + * \c FLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR by getting the + * seekable stream encoder's state. + * + * \param encoder A encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval const char * + * The encoder state as a C string. Do not modify the contents. + */ FLAC_API const char *FLAC__file_encoder_get_resolved_state_string(const FLAC__FileEncoder *encoder); /** Get relevant values about the nature of a verify decoder error. diff --git a/include/FLAC/seekable_stream_decoder.h b/include/FLAC/seekable_stream_decoder.h index 18f581c7..d9c01fd7 100644 --- a/include/FLAC/seekable_stream_decoder.h +++ b/include/FLAC/seekable_stream_decoder.h @@ -684,7 +684,17 @@ FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_stat */ FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder); -/*@@@@ document */ +/** Get the current decoder state as a C string. + * This version automatically resolves + * \c FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR by getting the + * stream decoder's state. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval const char * + * The decoder state as a C string. Do not modify the contents. + */ FLAC_API const char *FLAC__seekable_stream_decoder_get_resolved_state_string(const FLAC__SeekableStreamDecoder *decoder); /** Get the "MD5 signature checking" flag. @@ -756,7 +766,21 @@ FLAC_API unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__Seek */ FLAC_API unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder); -/*@@@@ document */ +/** Returns the decoder's current read position within the stream. + * The position is the byte offset from the start of the stream. + * Bytes before this position have been fully decoded. Note that + * there may still be undecoded bytes in the decoder's read FIFO. + * The returned position is correct even after a seek. + * + * \param decoder A decoder instance to query. + * \param position Address at which to return the desired position. + * \assert + * \code decoder != NULL \endcode + * \code position != NULL \endcode + * \retval FLAC__bool + * \c true if successful, \c false if there was an error from + * the 'tell' callback. + */ FLAC_API FLAC__bool FLAC__seekable_stream_decoder_get_decode_position(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *position); /** Initialize the decoder instance. diff --git a/include/FLAC/seekable_stream_encoder.h b/include/FLAC/seekable_stream_encoder.h index 55309e5b..3521dd68 100644 --- a/include/FLAC/seekable_stream_encoder.h +++ b/include/FLAC/seekable_stream_encoder.h @@ -597,7 +597,17 @@ FLAC_API FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encod */ FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state(const FLAC__SeekableStreamEncoder *encoder); -/*@@@@ document */ +/** Get the current encoder state as a C string. + * This version automatically resolves + * \c FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR by getting the + * stream encoder's state. + * + * \param encoder A encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval const char * + * The encoder state as a C string. Do not modify the contents. + */ FLAC_API const char *FLAC__seekable_stream_encoder_get_resolved_state_string(const FLAC__SeekableStreamEncoder *encoder); /** Get relevant values about the nature of a verify decoder error. diff --git a/include/FLAC/stream_encoder.h b/include/FLAC/stream_encoder.h index df0afbbb..2c022b4c 100644 --- a/include/FLAC/stream_encoder.h +++ b/include/FLAC/stream_encoder.h @@ -745,7 +745,17 @@ FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__Str */ FLAC_API FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder); -/*@@@@ document */ +/** Get the current encoder state as a C string. + * This version automatically resolves + * \c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR by getting the + * verify decoder's state. + * + * \param encoder A encoder instance to query. + * \assert + * \code encoder != NULL \endcode + * \retval const char * + * The encoder state as a C string. Do not modify the contents. + */ FLAC_API const char *FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder); /** Get relevant values about the nature of a verify decoder error.