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.
Apple AVAudioEngine + AVAudioPlayerNode transport session.
Shared playback session: prepare → convert once → either legacy playBlocking or ingest ⊥ transport (useTransportPlayback).
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.
Inclusive-exclusive media time still held in the transport buffer.
How much signal processing the platform applies to captured microphone input.
IMPORTANT: You must add the NSMicrophoneUsageDescription key to your Info.plist.
IOS implementation for AVAudioPlaybackSession.
IOS implementation for AVAudioRecordingSession.
JVM playback via JavaSound SourceDataLine, fed by PlaybackBuffer transport.
JVM implementation for AudioRecordingSession.
IMPORTANT: Add NSMicrophoneUsageDescription to your Info.plist (macOS).
macOS AudioQueue playback fed by PlaybackBuffer transport.
macOS implementation for AVAudioRecordingSession using AudioQueue input.
Retention and priming knobs for the transport space.kodio.core.transport.PlaybackBuffer.
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.
Outcome of a transport-level AudioPlaybackSession.seekTo attempt.
Web playback session using PlaybackBuffer transport.
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
Audio track constraints. raw turns off the browser's voice processing (echo cancellation, noise suppression, auto gain); otherwise the browser defaults apply.
Media duration corresponding to an absolute PCM byteOffset in format. Frame-aligned; partial trailing frames are ignored.
Initialize Kodio with an Activity.
Initialize Kodio with an Application instance.
Android-specific Kodio initialization.
Forward the permission callback to Kodio.
Frame-aligned byte offset into a PCM buffer for position.
Seconds offset into a PCM timeline for position, clamped to [0, durationSeconds] when durationSeconds is positive.
Converts this common AudioFormat to an AVAudioFormat instance.
Converts this AVAudioFormat to a common AudioFormat instance.
Converts a playback position to a sample-frame index at sampleRate.
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.