Improved sample rate handling