[][src]Function x42ltc_sys::ltc_encoder_set_bufsize

pub unsafe extern "C" fn ltc_encoder_set_bufsize(
    e: *mut LTCEncoder,
    sample_rate: f64,
    fps: f64
) -> c_int

Configure a custom size for the internal buffer.

This is needed if you are planning to call \ref ltc_encoder_reinit() or if you want to keep more than one LTC frame's worth of data in the library's internal buffer.

The buffer-size is (1 + sample_rate / fps) bytes. resizing the internal buffer will flush all existing data in it - alike \ref ltc_encoder_buffer_flush.

@param e encoder handle @param sample_rate audio sample rate (eg. 48000) @param fps video-frames per second (e.g. 25.0) @return 0 on success, -1 if allocation fails (which makes the encoder unusable, call \ref ltc_encoder_free or realloc the buffer)