Skip to main content

odin_resampler_process

Resamples a single chunk of audio. If the ODIN resampler instance was created with multiple channels, the data is assumed to be interleaved. The output_capacity argument also serves as an out parameter when the provided capacity wasn't enough to fulfill the resample request, in which case this function will write the minimum required buffer size into the given variable. On success, the written size for the processed sample is returned in both, the return value and the output_capacity out parameter.

Declaration
OdinReturnCode odin_resampler_process(OdinResamplerHandle resampler,
const float *input,
size_t input_len,
float *output,
size_t *output_capacity);

Parameters

resampler

Handle of the ODIN resampler instance. See

OdinResamplerHandle

for more information.

Declaration
OdinResamplerHandle resampler;

input

Pointer to the input audio data to be resampled.

Declaration
const float *input;

input_len

Length of the input audio data array.

Declaration
size_t input_len;

output

Pointer to the buffer where the resampled audio data will be stored.

Declaration
float *output;

output_capacity

Pointer to the buffer size available for the resampled audio data. This argument also serves as an out parameter when the provided capacity wasn't enough to fulfill the resample request. In this case, the function will write the minimum required buffer size into the given variable.

Declaration
size_t *output_capacity;

Returns

A return code indicating success or failure.

Return Type
OdinReturnCode