So, i've been experimenting around with RtAudio and libsndfile.
The task seemed to be simple:
1.) Read some samples into a buffer with libsndfile (using the SndfileHandle class and readf())
2.) Use RtAudio to play back the samples
BUT, for some reason, all i get is noize, and massive distortion ... i've tried to read the samples as 16 Bit PCM (using a short buffer), and use the RTAUDIO_SINT16 format to play it back. No success ... as a matter of fact, i've tried many different combinations, and there's only noise ...
The closest i've gotten to actual playback was using int16_t for the buffer and RTAUDIO_SINT16. Seems logical, right? Anyway, it's still like using a bitcrusher. Tried JACK and ALSA, and many different combinations of buffer sized, to no avail ...
Any hint on how to combine those two ?
Could it be a problem that i'm using a static buffer (just for experimentation, wouldn't do that in a final product, of course ...)?