read

abstract fun read(frameSize: Int): Array<Short>

Reads shorts audio samples from the input device with the specified buffer size. The buffer size determines the number of audio samples to read.

Return

An array of audio samples read from the device, or null if the buffer size exceeds available samples.

Parameters

frameSize

The size of the frame for reading samples.


open fun read(): Array<Short>

Reads short audio samples from the input device using the buffer size calculated from the AudioFormat.

Return

An array of audio samples read from the device, or null if the buffer size exceeds available samples.