Closed JerwuQu closed 6 months ago
Thanks for the PR! There were two (or well, three) issues here:
data.len() / num_output_channels
instead of the configured buffer size works as long as that number is below the configured buffer size (i.e. as long as these constraints still holds true). This is a bit annoying and there are also situations where you get more samples than you requested (e.g. https://github.com/RustAudio/cpal/issues/748), but I guess this behavior is still better than what it is now.
This is trying to solve the same thing as #104.
nih-plug
master
gives distorted audio for me when using wasapi or alsa backends when built standalone.104 fixes this, but for me it only worked for one channel, while this worked for all channels.
Tested working on Windows/WASAPI and Linux/Alsa. Further testing would be good too.