Java Minute samplesToMinutes(int sampleRate, int samples)

Here you can find the source of samplesToMinutes(int sampleRate, int samples)

Description

Calculates how many minutes samples are with sampleRate.

License

Open Source License

Parameter

Parameter Description
sampleRate The sample rate.
samples The number of samples.

Return

Samples in minutes.

Declaration

public static int samplesToMinutes(int sampleRate, int samples) 

Method Source Code

//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);
    }
}

Related

  1. mjdInMinutes(double mjd)
  2. nextMinutes(int diff)
  3. normalizeToMinute(Date date)
  4. numberOfMinutesForDays(int days)
  5. refineHourMinute(String timeString)
  6. secsToMinutes(long secs)
  7. selectOfToday(int hour, int minute, int second, int millisecond)
  8. shortTimeToMinutes(String time)
  9. sleepToNextMinute()