Added possibility to switch sample rate in viewer