[lib]: Cast to uint64_t to retain precision.

The sample rate calculation requires a uint32_t to be multiplied
by 128.  Since this value can be very close to the upper limit,
multiplying by 128 can send it over the limit.

To retain precision, a cast to a uint64_t is required.