Use the sample frequency rather then hardcode one.