readFrames

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

expect fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.

actual fun readFrames(maxFrames: Int): FloatArray

Reads up to maxFrames audio frames from the current position.

A frame consists of one sample per channel, so the returned array length is at most maxFrames * info.channelCount.

Return

A FloatArray of interleaved PCM samples. May be shorter than requested if the end of the file is reached.

Parameters

maxFrames

The maximum number of frames to read.

Throws

if a decoding error occurs.