getAudioBytesCount

fun getAudioBytesCount(duration: Long, sampleRate: Int): Int

Gets the audio size in bytes from a PCM16 formatted audio duration in milliseconds.

Return

The number of bytes of the audio.

Parameters

duration

The duration of the audio in milliseconds.

sampleRate

The sample rate of the audio.