AudioStream

abstract class AudioStream(val rate: Int, val channels: Int) : AudioStreamable, Closeable

Inheritors

Constructors

Link copied to clipboard
constructor(rate: Int, channels: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val finished: Boolean = false
Link copied to clipboard
val rate: Int
Link copied to clipboard
Link copied to clipboard
open val totalLengthInSamples: Long? = null

Functions

Link copied to clipboard
Link copied to clipboard
abstract suspend fun clone(): AudioStream
Link copied to clipboard
open override fun close()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun AudioStream.playAndWait(params: PlaybackParameters = PlaybackParameters.DEFAULT)
suspend fun AudioStream.playAndWait(times: PlaybackTimes = 1.playbackTimes, startTime: TimeSpan = 0.seconds, bufferTime: TimeSpan = 0.1.seconds)
Link copied to clipboard
open suspend fun read(out: AudioSamples, offset: Int = 0, length: Int = out.totalSamples): Int
Link copied to clipboard
suspend fun AudioStream.toData(maxSamples: Int = DEFAULT_MAX_SAMPLES): AudioData
Link copied to clipboard
Link copied to clipboard
suspend fun AudioStream.toSound(closeStream: Boolean = false, name: String = "Unknown"): Sound
suspend fun AudioStream.toSound(closeStream: Boolean = false, name: String = "Unknown", onComplete: suspend () -> Unit? = null): Sound
Link copied to clipboard
open suspend override fun toStream(): AudioStream
Link copied to clipboard
suspend fun AudioStreamable.withEcho(bufferLen: Int = 2048, config: AudioStreamEchoConfig = AudioStreamEchoConfig()): Sound
Link copied to clipboard
suspend fun AudioStreamable.withProcessor(block: suspend (inp: AudioStream, outp: AudioSamplesDeque) -> Unit): Sound