computeFrames method

int computeFrames(
  1. AudioFormat format
)

Compute the number of frames from format.

Implementation

int computeFrames(AudioFormat format) {
  return (seconds *
          format.sampleRate *
          format.sampleFormat.size *
          format.channels) ~/
      format.bytesPerFrame;
}