r8brain-sys 6.5.0

Raw bindings to `r8brain`, a sample rate converter designed by Aleksey Vaneev of Voxengo.
Documentation
#ifndef R8BRAIN_SYS_RESAMPLER_EXTERN_H
#define R8BRAIN_SYS_RESAMPLER_EXTERN_H

typedef struct HCDSPResampler HCDSPResampler;
typedef struct HCDSPResampler16 HCDSPResampler16;
typedef struct HCDSPResampler16IR HCDSPResampler16IR;
typedef struct HCDSPResampler24 HCDSPResampler24;

#ifdef __cplusplus
extern "C" {
#endif

HCDSPResampler* resampler_create(double src_sample_rate,
    double dst_sample_rate, int max_in_len, double req_trans_band,
    double req_attenuation, int phase);
void resampler_destroy(HCDSPResampler* resampler);
void resampler_clear(HCDSPResampler* resampler);
int resampler_getInLenBeforeOutPos(HCDSPResampler* resampler,
    int req_out_pos);
int resampler_getInLenBeforeOutStart(HCDSPResampler* resampler,
    int req_out_pos);
int resampler_getInputRequiredForOutput(HCDSPResampler* resampler,
    int req_out_samples);
int resampler_getLatency(HCDSPResampler* resampler);
double resampler_getLatencyFrac(HCDSPResampler* resampler);
int resampler_getMaxOutLen(HCDSPResampler* resampler, int max_in_len);
int resampler_process(HCDSPResampler* resampler, double* input,
    int input_len, double** output);
void resampler_oneshot(HCDSPResampler* resampler, const double* input,
    int input_len, double* output, int output_len);

HCDSPResampler16* resampler16_create(double src_sample_rate,
    double dst_sample_rate, int max_in_len, double req_trans_band);
void resampler16_destroy(HCDSPResampler16* resampler);
void resampler16_clear(HCDSPResampler16* resampler);
int resampler16_getInLenBeforeOutPos(HCDSPResampler16* resampler,
    int req_out_pos);
int resampler16_getInLenBeforeOutStart(HCDSPResampler16* resampler,
    int req_out_pos);
int resampler16_getInputRequiredForOutput(HCDSPResampler16* resampler,
    int req_out_samples);
int resampler16_getLatency(HCDSPResampler16* resampler);
double resampler16_getLatencyFrac(HCDSPResampler16* resampler);
int resampler16_getMaxOutLen(HCDSPResampler16* resampler, int max_in_len);
int resampler16_process(HCDSPResampler16* resampler, double* input,
    int input_len, double** output);
void resampler16_oneshot(HCDSPResampler16* resampler, const double* input,
    int input_len, double* output, int output_len);

HCDSPResampler16IR* resampler16IR_create(double src_sample_rate,
    double dst_sample_rate, int max_in_len, double req_trans_band);
void resampler16IR_destroy(HCDSPResampler16IR* resampler);
void resampler16IR_clear(HCDSPResampler16IR* resampler);
int resampler16IR_getInLenBeforeOutPos(HCDSPResampler16IR* resampler,
    int req_out_pos);
int resampler16IR_getInLenBeforeOutStart(HCDSPResampler16IR* resampler,
    int req_out_pos);
int resampler16IR_getInputRequiredForOutput(HCDSPResampler16IR* resampler,
    int req_out_samples);
int resampler16IR_getLatency(HCDSPResampler16IR* resampler);
double resampler16IR_getLatencyFrac(HCDSPResampler16IR* resampler);
int resampler16IR_getMaxOutLen(HCDSPResampler16IR* resampler,
    int max_in_len);
int resampler16IR_process(HCDSPResampler16IR* resampler, double* input,
    int input_len, double** output);
void resampler16IR_oneshot(HCDSPResampler16IR* resampler,
    const double* input, int input_len, double* output, int output_len);

HCDSPResampler24* resampler24_create(double src_sample_rate,
    double dst_sample_rate, int max_in_len, double req_trans_band);
void resampler24_destroy(HCDSPResampler24* resampler);
void resampler24_clear(HCDSPResampler24* resampler);
int resampler24_getInLenBeforeOutPos(HCDSPResampler24* resampler,
    int req_out_pos);
int resampler24_getInLenBeforeOutStart(HCDSPResampler24* resampler,
    int req_out_pos);
int resampler24_getInputRequiredForOutput(HCDSPResampler24* resampler,
    int req_out_samples);
int resampler24_getLatency(HCDSPResampler24* resampler);
double resampler24_getLatencyFrac(HCDSPResampler24* resampler);
int resampler24_getMaxOutLen(HCDSPResampler24* resampler, int max_in_len);
int resampler24_process(HCDSPResampler24* resampler, double* input,
    int input_len, double** output);
void resampler24_oneshot(HCDSPResampler24* resampler, const double* input,
    int input_len, double* output, int output_len);

#ifdef __cplusplus
} // extern "C"
#endif

#endif