My fault: it turns out my input stream is mono, so the pcm_r array contained garbage. Copying the pcm_l stream to the right stereo channel made it all turn out fine!
Hi Michael, I'm afraid I can't spot any problem in the code above. Perhaps the problem is in some of the other code around the code you have posted?
I'm not aware of any bug in soxr in this area. For example, using soxr example number 4 (which exercises split-channel I/O) with a test signal and your parameters above, the resultant spectrogram looks clean and as expected:
Hi,
Thanks for soxr, it (nearly) does what I want.
I get random clicking/popping artifacts in the output buffer with the following initialization and soxr_process call. Is this a bug?
&err, &io_spec, &quality_spec, NULL);
int16_t obuf[2][olen];
soxr_cbuf_t obufs[] = {obuf[0], obuf[1]};
soxr_cbuf_t ibufs[] = {pcm_l, pcm_r}; // pcm_l and pcm_r are int16_t arrays.
size_t nframes = 0;
soxr_process(soxr, ibufs, nsamples, NULL,
obufs, olen, &nframes);
Thanks for any help you can offer,
Michael.
My fault: it turns out my input stream is mono, so the pcm_r array contained garbage. Copying the pcm_l stream to the right stereo channel made it all turn out fine!
Thanks,
Michael.
Hi Michael, I'm afraid I can't spot any problem in the code above. Perhaps the problem is in some of the other code around the code you have posted?
I'm not aware of any bug in soxr in this area. For example, using soxr example number 4 (which exercises split-channel I/O) with a test signal and your parameters above, the resultant spectrogram looks clean and as expected: