Add some error checking on the sample rate.