Improved fix by changing the formula for how memory is allocated to arbitrary sample rate conversion.