Package-level declarations

Types

Link copied to clipboard

A simple container for raw audio data and its format.

Link copied to clipboard

Functions

Link copied to clipboard
fun audioFlowOf(format: AudioFormat, vararg bytes: Byte): AudioFlow

Creates a single-chunk AudioFlow from bytes interpreted as PCM in format.

Link copied to clipboard

Collects every chunk from this flow into one contiguous PCM buffer wrapped as an AudioSource with this flow's AudioFlow.format.

Link copied to clipboard

Convert an AudioFlow to a different AudioFormat. Pipeline: bytes -> normalized samples -> resample -> channel convert -> bytes

Link copied to clipboard
fun decode(chunk: ByteArray, format: AudioFormat): Array<BigDecimal>

Decodes raw PCM bytes to normalized samples in -1.0, 1.0.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Serializes this device to a binary blob suitable for wire transfer or storage.

Serializes this format to a binary blob suitable for wire transfer or storage.

Serializes this playback session state to a binary blob.

Serializes this recording session state to a binary blob.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Buffer.readInt(endianness: Endianness): Int

Reads an Int using endianness (little or big endian).

Link copied to clipboard
fun Buffer.readLong(endianness: Endianness): Long

Reads a Long using endianness (little or big endian).

Link copied to clipboard
fun Buffer.readShort(endianness: Endianness): Short

Reads a Short using endianness (little or big endian).

Link copied to clipboard
fun Buffer.readUtf8(): String

Reads a length-prefixed UTF-8 string written by writeUtf8: a big-endian 32-bit byte count followed by the UTF-8 payload.

Link copied to clipboard
fun Buffer.writeAudioDevice(audioDevice: AudioDevice)
Link copied to clipboard
fun Buffer.writeAudioFormat(audioFormat: AudioFormat)
Link copied to clipboard
fun Buffer.writeAudioFormatSupport(audioFormatSupport: AudioFormatSupport)
Link copied to clipboard
Link copied to clipboard
fun Buffer.writeInt(endianness: Endianness, int: Int)

Writes int using endianness (little or big endian).

Link copied to clipboard
fun Buffer.writeLong(endianness: Endianness, long: Long)

Writes long using endianness (little or big endian).

Link copied to clipboard
fun Buffer.writeShort(endianness: Endianness, short: Short)

Writes short using endianness (little or big endian).

Link copied to clipboard
fun Buffer.writeUtf8(string: String)

Writes string as length-prefixed UTF-8: a big-endian 32-bit byte count followed by the UTF-8 payload (same layout as readUtf8).