Function x42ltc_sys::ltc_encoder_encode_byte
source · pub unsafe extern "C" fn ltc_encoder_encode_byte(
e: *mut LTCEncoder,
byte: c_int,
speed: f64
) -> c_int
Expand description
Generate LTC audio for given byte of the LTC-frame and place it into the internal buffer.
see \ref ltc_encoder_copy_buffer and \ref ltc_encoder_get_bufferptr
LTC has 10 bytes per frame: 0 <= bytecnt < 10 use SMPTESetTime(..) to set the current frame before Encoding. see tests/encoder.c for an example.
The default output signal is @ -3dBFS (38..218 at 8 bit unsigned). see also \ref ltc_encoder_set_volume
if speed is < 0, the bits are encoded in reverse. slowdown > 10.0 requires custom buffer sizes; see \ref ltc_encoder_set_buffersize
@param e encoder handle @param byte byte of the LTC-frame to encode 0..9 @param speed vari-speed, < 1.0 faster, > 1.0 slower ; must be != 0
@return 0 on success, -1 if byte is invalid or buffer overflow (speed > 10.0)