Resampling audio buffers Soxr lib

Hello everyone.

I have been trying to use SoXr library to resample audio buffers. I use WASAPI to get audio buffers.

Here is a part of my code :

"soxr_error_t err;
soxr_datatype_t itype = SOXR_INT16_I;
soxr_datatype_t otype = SOXR_INT16_I;
soxr_io_spec_t iospec = soxr_io_spec(itype, otype);
size_t idone = 0;
size_t odone = 0;

while(...) {
soxr_t sox = soxr_create(44100, 48000, 2, &err, &iospec, NULL, NULL);
soxr_process(sox, inbuf, numFramesToRead, &idone, outbuf, numFramesToWrite, &odone)
soxr_delete(sox);
}"

"inbuf" contains short integers (audio data).

I looked on the Internet to find some examples but I couldn't find help. I read documentation and tried examples but my code doesn't work.
"odone" always equals 0 and audio data doesn't seem to be resampled.

I anyone knows a forum where I could discuss about resampling with soxr library or I you have been using soxr, I would really appreciate your help.

Thank you :)
I have been able to make it work but "odone" is not always exactly the same.
In my case,"odone" should be equal to 500 ( numFramesToWrite) but sometimes odone = 463.
Do you know why it happens ?

If you know a more appropriate forum where I could discuss that, let me know.
Thank you.
Topic archived. No new replies allowed.