BASE_waveLength static method

int BASE_waveLength(
  1. int frameCount,
  2. int channels
)

Computes the total number of samples for a wave with the given frameCount and channels, i.e. frameCount * channels.

Returns 0 if either argument is 0.

Implementation

static int BASE_waveLength(int frameCount, int channels) {
  if (frameCount == 0 || channels == 0) return 0;
  return frameCount * channels;
}