Package-level declarations
Types
Link copied to clipboard
class AnalyzingCallback(analyzer: AudioAnalyzer, delegate: AudioStreamCallback? = null, scope: CoroutineScope) : AudioStreamCallback
Functions
Link copied to clipboard
fun AudioFileReader.asFlow(chunkSize: Int = 4096, dispatcher: CoroutineDispatcher = defaultIoDispatcher): Flow<FloatArray>
Streams decoded audio data as a Flow of chunks.
Link copied to clipboard
Suspends until the stream reaches the target StreamState.
Suspends until the timer reaches target.
Link copied to clipboard
Audio interruptions as a cold Flow.
Link copied to clipboard
Emits the peak audio level at a regular polling interval.
Link copied to clipboard
suspend fun AudioFileReader.readAllSuspend(dispatcher: CoroutineDispatcher = defaultIoDispatcher): FloatArray
Reads and decodes all remaining audio frames on the IO dispatcher.
Link copied to clipboard
suspend fun AudioFileReader.readFramesSuspend(maxFrames: Int, dispatcher: CoroutineDispatcher = defaultIoDispatcher): FloatArray
Reads up to maxFrames audio frames on the IO dispatcher.
Link copied to clipboard
Emits SleepTimer.remainingMs on a regular interval.
Link copied to clipboard
Audio route changes as a cold Flow.
Link copied to clipboard
Observes the stream's StreamState as a cold Flow.
Observes the timer's SleepTimerState as a cold Flow.
Link copied to clipboard
suspend fun AudioFileWriter.writeFramesSuspend(data: FloatArray, numFrames: Int, dispatcher: CoroutineDispatcher = defaultIoDispatcher)
Writes audio frames on the IO dispatcher.