usToFrames method

int usToFrames(
  1. int us
)

For internal use only.

Implementation

int usToFrames(int us) {
  if (sampleRate == null) return 0;
  return (us * SECONDS_PER_US * sampleRate!).round();
}