Package-level declarations
Types
Android implementation of BaseAudioRecordingSession.
Represents an audio device, sealed for type safety between inputs and outputs.
Sealed hierarchy representing all possible audio-related errors.
A typed stream of raw PCM audio: an AudioFormat paired with a Flow of ByteArray chunks.
Canonical audio format
Represents the knowability of a device's supported audio formats.
Represents an active playback session.
Simplified audio quality presets for common use cases.
Represents a recorded audio clip with its format metadata.
Represents an active recording session.
Unified state machine for both recording and playback sessions.
Manages audio devices and sessions.
An abstract base class for AudioRecordingSession that handles the logic for providing a live "hot" flow during recording, and a replayable "cold" flow after the recording is finished.
IMPORTANT: You must add the NSMicrophoneUsageDescription key to your Info.plist.
IOS implementation for AVAudioPlaybackSession.
IOS implementation for AVAudioRecordingSession.
JVM implementation for AudioPlaybackSession.
JVM implementation for AudioRecordingSession.
IMPORTANT: Add NSMicrophoneUsageDescription to your Info.plist (macOS).
Mac OS implementation for AudioPlaybackSession using Core Audio AudioQueue (output).
macOS implementation for AVAudioRecordingSession using AudioQueue input.
High-level wrapper around AudioPlaybackSession providing a simplified API.
Configuration for creating a Player.
High-level wrapper around AudioRecordingSession providing a simplified API.
Configuration for creating a Recorder.
Audio sample encoding. No “signed/unsigned” for floats anymore.
How samples are laid out in memory.
Web playback session. Output device selection via AudioContext.setSinkId is deferred: the API is Chrome/Edge-only as of 2026 (unsupported in Firefox and Safari). Adding it would require feature-detected progressive enhancement and a device-passing API on the web playback path, which does not exist yet. AudioError.DeviceSelectionUnsupported remains the fallback behavior.
Properties
Check if a state allows starting a new operation.
Platform default recording format on Android: 48 kHz, mono, signed 16-bit little-endian interleaved PCM (same as DefaultRecordingInt16).
Platform default recording format on Apple platforms: 48 kHz, mono, signed 16-bit little-endian interleaved PCM (same as DefaultRecordingInt16).
Default warmup window applied to JavaSound captures so the silent priming frames a TargetDataLine produces on the first read are dropped before we start emitting audio downstream.
Default float recording format: 48 kHz, mono, 32-bit float interleaved PCM.
Default recording format: 48 kHz, mono, signed 16-bit little-endian interleaved PCM.
Check if a state represents an active session.
Check if a state represents a terminal state (Complete or Failed).
Tunable warmup applied by JvmAudioRecordingSession.
Android implementation for AudioSystem. IMPORTANT: You must add the RECORD_AUDIO permission to your AndroidManifest.xml and handle the runtime permission request in your application.
JS implementation of the AudioSystem using the Web Audio API. This requires a secure context (HTTPS) to function in a browser.
JVM implementation for AudioSystem.
JS implementation of the AudioSystem using the Web Audio API. This requires a secure context (HTTPS) to function in a browser.
Functions
Initialize Kodio with an Activity.
Initialize Kodio with an Application instance.
Android-specific Kodio initialization.
Forward the permission callback to Kodio.
Converts this common AudioFormat to an AVAudioFormat instance.
Converts this AVAudioFormat to a common AudioFormat instance.
Extension to convert legacy playback session states to the unified state.
Extension to convert legacy recording session states to the unified state.
Extension for using Player with Kotlin's use pattern. Ensures proper cleanup even if an exception occurs.
Extension for using Recorder with Kotlin's use pattern. Ensures proper cleanup even if an exception occurs.