[][src]Type Definition flac_sys::FLAC__StreamDecoderWriteCallback

type FLAC__StreamDecoderWriteCallback = Option<unsafe extern "C" fn(decoder: *const FLAC__StreamDecoder, frame: *const FLAC__Frame, buffer: *const *const FLAC__int32, client_data: *mut c_void) -> FLAC__StreamDecoderWriteStatus>;

Signature for the write callback.

A function pointer matching this signature must be passed to one of the FLAC__stream_decoder_init_*() functions. The supplied function will be called when the decoder has decoded a single audio frame. The decoder will pass the frame metadata as well as an array of pointers (one for each channel) pointing to the decoded audio.

\note In general, FLAC__StreamDecoder functions which change the state should not be called on the \a decoder while in the callback.

\param decoder The decoder instance calling the callback. \param frame The description of the decoded frame. See FLAC__Frame. \param buffer An array of pointers to decoded channels of data. Each pointer will point to an array of signed samples of length \a frame->header.blocksize. Channels will be ordered according to the FLAC specification; see the documentation for the frame header. \param client_data The callee's client data set through FLAC__stream_decoder_init_*(). \retval FLAC__StreamDecoderWriteStatus The callee's return status.