[][src]Function flac_sys::FLAC__stream_decoder_skip_single_frame

pub unsafe extern "C" fn FLAC__stream_decoder_skip_single_frame(
    decoder: *mut FLAC__StreamDecoder
) -> FLAC__bool

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.

The decoding flow is the same as what occurs when FLAC__stream_decoder_process_single() is called to process an audio frame, except that this function does not decode the parsed data into PCM or call the write callback. The integrity of the frame is still checked the same way as in the other process functions.

This function will return once one whole frame is skipped, in the same way that FLAC__stream_decoder_process_single() will return once one whole frame is decoded.

This function can be used in more quickly determining FLAC frame boundaries when decoding of the actual data is not needed, for example when an application is separating a FLAC stream into frames for editing or storing in a container. To do this, the application can use FLAC__stream_decoder_skip_single_frame() to quickly advance to the next frame, then use FLAC__stream_decoder_get_decode_position() to find the new frame boundary.

This function should only be called when the stream has advanced past all the metadata, otherwise it will return \c false.

\param decoder An initialized decoder instance not in a metadata state. \assert \code decoder != NULL \endcode \retval FLAC__bool \c false if any fatal read, write, or memory allocation error occurred (meaning decoding must stop), or if the decoder is in the FLAC__STREAM_DECODER_SEARCH_FOR_METADATA or FLAC__STREAM_DECODER_READ_METADATA state, else \c true; for more information about the decoder, check the decoder state with FLAC__stream_decoder_get_state().