Writable

class Writable(aqRef: AudioQueueRef, asbd: AudioStreamBasicDescription, stateRef: StableRef<MacosAudioQueue.Writable.State>) : MacosAudioQueue<MacosAudioQueue.Writable.State>

Constructors

Link copied to clipboard
constructor(aqRef: AudioQueueRef, asbd: AudioStreamBasicDescription, stateRef: StableRef<MacosAudioQueue.Writable.State>)

Types

Link copied to clipboard
class State(val running: Boolean, val availableBuffers: Channel<AudioQueueBufferRef>)

Functions

Link copied to clipboard
fun dispose(inImmediate: Boolean = true)

Disposes the aqRef.

Link copied to clipboard
fun flush()

Resets the aqRef's decoder state.

Link copied to clipboard
fun pause()

Pauses playing or recording audio.

Link copied to clipboard
fun reset()

Resets the aqRef.

Link copied to clipboard
fun start()

Begins playing or recordings audio.

Link copied to clipboard
fun stop(inImmediate: Boolean = true)

Stops playing or recording audio.

Link copied to clipboard
suspend fun streamFrom(src: AudioFlow, maxWriteAttempts: Int = 10)
Link copied to clipboard
suspend fun streamFromWithPriming(src: AudioFlow, primingBuffers: Int)

Streams audio with proper priming - fills initial buffers before starting the queue. This is required for output queues to work correctly.