OK, I've now done some quick and certainly non-representative tests by
simply adding a hack a la "nGeneratedSamples = len * 9 / 10" at the
beginning of the callback function, to see whether I could hear a
difference between setting the remaining part of the buffer to 0 or
duplicating the samples. But I have to say that both just sounded bad.
Maybe the sample duplication was a tiny little, little bit better than
the setting to 0, but that could also be just my imagination.
So let's do the "keep it simple" principle here and go for your
suggestion to always set the remaining part of the buffer to 0.
Could you do that "memset-to-zero" patch, or shall I do it?