deimos.flac.stream_decoder

Undocumented in source.

Members

Aliases

FLAC__StreamDecoderEofCallback
alias FLAC__StreamDecoderEofCallback = FLAC__bool function(const FLAC__StreamDecoder* decoder, void* client_data)

Signature for the EOF callback.

FLAC__StreamDecoderErrorCallback
alias FLAC__StreamDecoderErrorCallback = void function(const FLAC__StreamDecoder* decoder, FLAC__StreamDecoderErrorStatus status, void* client_data)

Signature for the error callback.

FLAC__StreamDecoderLengthCallback
alias FLAC__StreamDecoderLengthCallback = FLAC__StreamDecoderLengthStatus function(const FLAC__StreamDecoder* decoder, FLAC__uint64* stream_length, void* client_data)

Signature for the length callback.

FLAC__StreamDecoderMetadataCallback
alias FLAC__StreamDecoderMetadataCallback = void function(const FLAC__StreamDecoder* decoder, const FLAC__StreamMetadata* metadata, void* client_data)

Signature for the metadata callback.

FLAC__StreamDecoderReadCallback
alias FLAC__StreamDecoderReadCallback = FLAC__StreamDecoderReadStatus function(const FLAC__StreamDecoder* decoder, FLAC__byte* buffer, size_t* bytes, void* client_data)

Signature for the read callback.

FLAC__StreamDecoderSeekCallback
alias FLAC__StreamDecoderSeekCallback = FLAC__StreamDecoderSeekStatus function(const FLAC__StreamDecoder* decoder, FLAC__uint64 absolute_byte_offset, void* client_data)

Signature for the seek callback.

FLAC__StreamDecoderTellCallback
alias FLAC__StreamDecoderTellCallback = FLAC__StreamDecoderTellStatus function(const FLAC__StreamDecoder* decoder, FLAC__uint64* absolute_byte_offset, void* client_data)

Signature for the tell callback.

FLAC__StreamDecoderWriteCallback
alias FLAC__StreamDecoderWriteCallback = FLAC__StreamDecoderWriteStatus function(const FLAC__StreamDecoder* decoder, const FLAC__Frame* frame, const FLAC__int32** buffer, void* client_data)

Signature for the write callback.

Enums

FLAC__StreamDecoderErrorStatus
enum FLAC__StreamDecoderErrorStatus

Possible values passed back to the FLAC__StreamDecoder error callback. \c FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC is the generic catch- all. The rest could be caused by bad sync (false synchronization on data that is not the start of a frame) or corrupted data. The error itself is the decoder's best guess at what happened assuming a correct sync. For example \c FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER could be caused by a correct sync on the start of a frame, but some data in the frame header was corrupted. Or it could be the result of syncing on a point the stream that looked like the starting of a frame but was not. \c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM could be because the decoder encountered a valid frame made by a future version of the encoder which it cannot parse, or because of a false sync making it appear as though an encountered frame was generated by a future encoder.

FLAC__StreamDecoderInitStatus
enum FLAC__StreamDecoderInitStatus

Possible return values for the FLAC__stream_decoder_init_*() functions.

FLAC__StreamDecoderLengthStatus
enum FLAC__StreamDecoderLengthStatus

Return values for the FLAC__StreamDecoder length callback.

FLAC__StreamDecoderReadStatus
enum FLAC__StreamDecoderReadStatus

Return values for the FLAC__StreamDecoder read callback.

FLAC__StreamDecoderSeekStatus
enum FLAC__StreamDecoderSeekStatus

Return values for the FLAC__StreamDecoder seek callback.

FLAC__StreamDecoderState
enum FLAC__StreamDecoderState

State values for a FLAC__StreamDecoder

FLAC__StreamDecoderTellStatus
enum FLAC__StreamDecoderTellStatus

Return values for the FLAC__StreamDecoder tell callback.

FLAC__StreamDecoderWriteStatus
enum FLAC__StreamDecoderWriteStatus

Return values for the FLAC__StreamDecoder write callback.

Functions

FLAC__stream_decoder_delete
void FLAC__stream_decoder_delete(FLAC__StreamDecoder* decoder)

Free a decoder instance. Deletes the object pointed to by \a decoder.

FLAC__stream_decoder_finish
FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder* decoder)

Finish the decoding process. Flushes the decoding buffer, releases resources, resets the decoder settings to their defaults, and returns the decoder state to FLAC__STREAM_DECODER_UNINITIALIZED.

FLAC__stream_decoder_flush
FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder* decoder)

Flush the stream input. The decoder's input buffer will be cleared and the state set to \c FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC. This will also turn off MD5 checking.

FLAC__stream_decoder_get_bits_per_sample
uint FLAC__stream_decoder_get_bits_per_sample(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 value from the most recently decoded frame header.

FLAC__stream_decoder_get_blocksize
uint FLAC__stream_decoder_get_blocksize(FLAC__StreamDecoder* decoder)

Get the current blocksize of the stream being decoded. Will only be valid after decoding has started and will contain the value from the most recently decoded frame header.

FLAC__stream_decoder_get_channel_assignment
FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(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 value from the most recently decoded frame header.

FLAC__stream_decoder_get_channels
uint FLAC__stream_decoder_get_channels(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 value from the most recently decoded frame header.

FLAC__stream_decoder_get_decode_position
FLAC__bool FLAC__stream_decoder_get_decode_position(FLAC__StreamDecoder* decoder, FLAC__uint64* position)

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.

FLAC__stream_decoder_get_md5_checking
FLAC__bool FLAC__stream_decoder_get_md5_checking(FLAC__StreamDecoder* decoder)

Get the "MD5 signature checking" flag. This is the value of the setting, not whether or not the decoder is currently checking the MD5 (remember, it can be turned off automatically by a seek). When the decoder is reset the flag will be restored to the value returned by this function.

FLAC__stream_decoder_get_resolved_state_string
const(char)* FLAC__stream_decoder_get_resolved_state_string(FLAC__StreamDecoder* decoder)

Get the current decoder state as a C string.

FLAC__stream_decoder_get_sample_rate
uint FLAC__stream_decoder_get_sample_rate(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 value from the most recently decoded frame header.

FLAC__stream_decoder_get_state
FLAC__StreamDecoderState FLAC__stream_decoder_get_state(FLAC__StreamDecoder* decoder)

Get the current decoder state.

FLAC__stream_decoder_get_total_samples
FLAC__uint64 FLAC__stream_decoder_get_total_samples(FLAC__StreamDecoder* decoder)

Get the total number of samples in the stream being decoded. Will only be valid after decoding has started and will contain the value from the \c STREAMINFO block. A value of \c 0 means "unknown".

FLAC__stream_decoder_init_FILE
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE(FLAC__StreamDecoder* decoder, FILE* file, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode native FLAC files.

FLAC__stream_decoder_init_file
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_file(FLAC__StreamDecoder* decoder, char* filename, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode native FLAC files.

FLAC__stream_decoder_init_ogg_FILE
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_FILE(FLAC__StreamDecoder* decoder, FILE* file, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode Ogg FLAC files.

FLAC__stream_decoder_init_ogg_file
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file(FLAC__StreamDecoder* decoder, char* filename, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode Ogg FLAC files.

FLAC__stream_decoder_init_ogg_stream
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_stream(FLAC__StreamDecoder* decoder, FLAC__StreamDecoderReadCallback read_callback, FLAC__StreamDecoderSeekCallback seek_callback, FLAC__StreamDecoderTellCallback tell_callback, FLAC__StreamDecoderLengthCallback length_callback, FLAC__StreamDecoderEofCallback eof_callback, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode Ogg FLAC streams.

FLAC__stream_decoder_init_stream
FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream(FLAC__StreamDecoder* decoder, FLAC__StreamDecoderReadCallback read_callback, FLAC__StreamDecoderSeekCallback seek_callback, FLAC__StreamDecoderTellCallback tell_callback, FLAC__StreamDecoderLengthCallback length_callback, FLAC__StreamDecoderEofCallback eof_callback, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void* client_data)

Initialize the decoder instance to decode native FLAC streams.

FLAC__stream_decoder_new
FLAC__StreamDecoder* FLAC__stream_decoder_new()

Create a new stream decoder instance. The instance is created with default settings; see the individual FLAC__stream_decoder_set_*() functions for each setting's default.

FLAC__stream_decoder_process_single
FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder* decoder)

Decode one metadata block or audio frame. This version instructs the decoder to decode a either a single metadata block or a single frame and stop, unless the callbacks return a fatal error or the read callback returns \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM.

FLAC__stream_decoder_process_until_end_of_metadata
FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder* decoder)

Decode until the end of the metadata. This version instructs the decoder to decode from the current position and continue until all the metadata has been read, or until the callbacks return a fatal error or the read callback returns \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM.

FLAC__stream_decoder_process_until_end_of_stream
FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder* decoder)

Decode until the end of the stream. This version instructs the decoder to decode from the current position and continue until the end of stream (the read callback returns \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM), or until the callbacks return a fatal error.

FLAC__stream_decoder_reset
FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder* decoder)

Reset the decoding process. The decoder's input buffer will be cleared and the state set to \c FLAC__STREAM_DECODER_SEARCH_FOR_METADATA. This is similar to FLAC__stream_decoder_finish() except that the settings are preserved; there is no need to call FLAC__stream_decoder_init_*() before decoding again. MD5 checking will be restored to its original setting.

FLAC__stream_decoder_seek_absolute
FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder* decoder, FLAC__uint64 sample)

Flush the input and seek to an absolute sample. Decoding will resume at the given sample. Note that because of this, the next write callback may contain a partial block. The client must support seeking the input or this function will fail and return \c false. Furthermore, if the decoder state is \c FLAC__STREAM_DECODER_SEEK_ERROR, then the decoder must be flushed with FLAC__stream_decoder_flush() or reset with FLAC__stream_decoder_reset() before decoding can continue.

FLAC__stream_decoder_set_md5_checking
FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder* decoder, FLAC__bool value)

Set the "MD5 signature checking" flag. If \c true, the decoder will compute the MD5 signature of the unencoded audio data while decoding and compare it to the signature from the STREAMINFO block, if it exists, during FLAC__stream_decoder_finish().

FLAC__stream_decoder_set_metadata_ignore
FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder* decoder, FLAC__MetadataType type)

Direct the decoder to filter out all metadata blocks of type \a type.

FLAC__stream_decoder_set_metadata_ignore_all
FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder* decoder)

Direct the decoder to filter out all metadata blocks of any type.

FLAC__stream_decoder_set_metadata_ignore_application
FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder* decoder, FLAC__byte id)

Direct the decoder to filter out all APPLICATION metadata blocks of the given \a id.

FLAC__stream_decoder_set_metadata_respond
FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder* decoder, FLAC__MetadataType type)

Direct the decoder to pass on all metadata blocks of type \a type.

FLAC__stream_decoder_set_metadata_respond_all
FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder* decoder)

Direct the decoder to pass on all metadata blocks of any type.

FLAC__stream_decoder_set_metadata_respond_application
FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder* decoder, FLAC__byte id)

Direct the decoder to pass on all APPLICATION metadata blocks of the given \a id.

FLAC__stream_decoder_set_ogg_serial_number
FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder* decoder, c_long serial_number)

Set the serial number for the FLAC stream within the Ogg container. The default behavior is to use the serial number of the first Ogg page. Setting a serial number here will explicitly specify which stream is to be decoded.

FLAC__stream_decoder_skip_single_frame
FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder* decoder)

Skip one audio frame. This version instructs the decoder to 'skip' a single frame and stop, unless the callbacks return a fatal error or the read callback returns \c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM.

Static variables

FLAC__StreamDecoderErrorStatusString
char** FLAC__StreamDecoderErrorStatusString;

Maps a FLAC__StreamDecoderErrorStatus to a C string.

FLAC__StreamDecoderInitStatusString
char** FLAC__StreamDecoderInitStatusString;

Maps a FLAC__StreamDecoderInitStatus to a C string.

FLAC__StreamDecoderLengthStatusString
char** FLAC__StreamDecoderLengthStatusString;

Maps a FLAC__StreamDecoderLengthStatus to a C string.

FLAC__StreamDecoderReadStatusString
char** FLAC__StreamDecoderReadStatusString;

Maps a FLAC__StreamDecoderReadStatus to a C string.

FLAC__StreamDecoderSeekStatusString
char** FLAC__StreamDecoderSeekStatusString;

Maps a FLAC__StreamDecoderSeekStatus to a C string.

FLAC__StreamDecoderStateString
char** FLAC__StreamDecoderStateString;

Maps a FLAC__StreamDecoderState to a C string.

FLAC__StreamDecoderTellStatusString
char** FLAC__StreamDecoderTellStatusString;

Maps a FLAC__StreamDecoderTellStatus to a C string.

FLAC__StreamDecoderWriteStatusString
char** FLAC__StreamDecoderWriteStatusString;

Maps a FLAC__StreamDecoderWriteStatus to a C string.

Structs

FLAC__StreamDecoder
struct FLAC__StreamDecoder

The opaque structure definition for the stream decoder type. See the \link flac_stream_decoder stream decoder module \endlink for a detailed description.

FLAC__StreamDecoderPrivate
struct FLAC__StreamDecoderPrivate
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FLAC__StreamDecoderProtected
struct FLAC__StreamDecoderProtected

class FLAC__StreamDecoder

Meta