Added sampling rate functionality