Implemented configurable sample rate.