[−][src]Function flac_sys::FLAC__stream_encoder_process_interleaved
pub unsafe extern "C" fn FLAC__stream_encoder_process_interleaved(
encoder: *mut FLAC__StreamEncoder,
buffer: *const FLAC__int32,
samples: c_uint
) -> FLAC__bool
Submit data for encoding. This version allows you to supply the input data where the channels are interleaved into a single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). The samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be channel0_sample0 and the last value channelN_sampleM. Each sample should be a signed integer, right-justified to the resolution set by FLAC__stream_encoder_set_bits_per_sample(). For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].
For applications where channel order is important, channels must follow the order as described in the frame header.
\param encoder An initialized encoder instance in the OK state. \param buffer An array of channel-interleaved data (see above). \param samples The number of samples in one channel, the same as for FLAC__stream_encoder_process(). For example, if encoding two channels, \c 1000 \a samples corresponds to a \a buffer of 2000 values. \assert \code encoder != NULL \endcode \code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \endcode \retval FLAC__bool \c true if successful, else \c false; in this case, check the encoder state with FLAC__stream_encoder_get_state() to see what went wrong.