Package-level declarations

Types

Link copied to clipboard

State holder for audio playback in Compose.

Link copied to clipboard

State holder for audio recording in Compose.

Link copied to clipboard

Defines how the waveform bars are aligned vertically within the component.

Link copied to clipboard
data class WaveformColors(val waveColor: Brush, val progressColor: Brush? = null, val inactiveColor: Brush? = null, val backgroundColor: Color = Color.Transparent)

Color configuration for AudioWaveform.

Link copied to clipboard
sealed class WaveformStyle

Sealed class representing different waveform visualization styles.

Functions

Link copied to clipboard
fun AudioWaveform(amplitudes: List<Float>, modifier: Modifier = Modifier, style: WaveformStyle = WaveformStyle.Bar(), colors: WaveformColors = WaveformColors.default(), animate: Boolean = true)

Simplified overload for basic waveform display without progress tracking.

fun AudioWaveform(amplitudes: List<Float>, modifier: Modifier = Modifier, style: WaveformStyle = WaveformStyle.Bar(), colors: WaveformColors = WaveformColors.default(), progress: Float = 1.0f, onProgressChange: (Float) -> Unit? = null, animate: Boolean = true, animationSpec: AnimationSpec<Float> = spring( dampingRatio = Spring.DampingRatioMediumBouncy, stiffness = Spring.StiffnessLow ))

A highly customizable audio waveform visualization composable.

Link copied to clipboard
fun rememberPlayerState(device: AudioDevice.Output? = null, onPlaybackComplete: () -> Unit? = null): PlayerState

Creates and remembers a PlayerState for audio playback.

fun rememberPlayerState(recording: AudioRecording, device: AudioDevice.Output? = null, onPlaybackComplete: () -> Unit? = null): PlayerState

Creates and remembers a PlayerState pre-loaded with an AudioRecording.

Link copied to clipboard
fun rememberRecorderState(quality: AudioQuality = AudioQuality.Default, device: AudioDevice.Input? = null, liveWaveformGain: Float = DEFAULT_LIVE_WAVEFORM_GAIN, onRecordingComplete: (AudioRecording) -> Unit? = null): RecorderState

Creates and remembers a RecorderState for audio recording.