sampling rate detection