get sample rate dynamically