Here you can find the source of samplesToMinutes(int sampleRate, int samples)
samples
are with sampleRate
.
Parameter | Description |
---|---|
sampleRate | The sample rate. |
samples | The number of samples. |
public static int samplesToMinutes(int sampleRate, int samples)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w.ja v a 2 s . c o m * Calculates how many minutes <code>samples</code> are with * <code>sampleRate</code>. * * @param sampleRate The sample rate. * @param samples The number of samples. * @return Samples in minutes. */ public static int samplesToMinutes(int sampleRate, int samples) { return Math.round(((float) samples / sampleRate) / 60.0f); } }