lc3_hr_setup_decoder

Function lc3_hr_setup_decoder 

Source
pub unsafe extern "C" fn lc3_hr_setup_decoder(
    hrmode: bool,
    dt_us: c_int,
    sr_hz: c_int,
    sr_pcm_hz: c_int,
    mem: *mut c_void,
) -> lc3_decoder_t
Expand description

Setup decoder hrmode Enable High-Resolution mode (48000 and 96000 sample rates) dt_us Frame duration in us, 2500, 5000, 7500 or 10000 sr_hz Sample rate in Hz, 8000, 16000, 24000, 32000, 48000 or 96000 sr_pcm_hz Output sample rate, upsampling option of output (or 0) mem Decoder memory space, aligned to pointer type return Decoder as an handle, NULL on bad parameters

The sr_pcm_hz parameter is an upsampling option of PCM output, the value 0 fallback to the sample rate of the decoded stream sr_hz. When used, sr_pcm_hz is intended to be higher or equal to the decoder sample rate sr_hz. The size of the context needed, given by lc3_hr_decoder_size() will be set accordingly to sr_pcm_hz.