How to convert samples to milliseconds
A sample rate states how many samples occur in one second. Divide the sample count by the sample rate to get seconds, then multiply by 1,000 for milliseconds. To convert in the other direction, multiply milliseconds by the sample rate and divide by 1,000.
milliseconds = samples ÷ sample rate × 1,000