Try to autoadjust samplerate based on periode.