But we have not enough information about stream in this function! we only have buffer and number of frames in this buffer. we even don't know where is the stream come from? which format? stereo or not? float or int? 8-bit?16-bit? or 32-bit?... So personnally, I don't think it's easy to do resampling here. It's better that the stream here is already standarlized as 44100 stereo s16 frames. So, if the stream is already standarlized, where we still care about the output frequency?