OutputDevice

An audio output device capable of creating and managing audio sources.

Parameters

S

The type of audio sources that can be created by this output device.

Inheritors

Properties

Link copied to clipboard
abstract val format: AudioFormat

Gets the audio format associated with the device.

Link copied to clipboard
abstract val frameSize: Int

Gets the 20ms frame size calculated based on the audio format.

Link copied to clipboard
abstract val name: String

Gets the name of the audio device.

Link copied to clipboard
open override val type: DeviceType

Gets the type of the audio device.

Functions

Link copied to clipboard
open fun addFilter(filter: AudioFilter)

Adds an audio filter to the device with normal priority.

abstract fun addFilter(filter: AudioFilter, priority: AudioFilter.Priority)

Adds an audio filter to the device with the specified priority.

Link copied to clipboard
abstract fun close()

Closes the audio device.

Link copied to clipboard
abstract suspend fun closeSources()

Closes all audio sources associated with this output device.

Link copied to clipboard

Asynchronously closes all audio sources associated with this output device.

Link copied to clipboard
abstract fun createSource(stereo: Boolean, params: DeviceSourceParams): S

Creates a new audio source associated with this output device.

Link copied to clipboard

Gets the collection of audio filters applied to the device.

Link copied to clipboard
abstract fun isOpen(): Boolean

Checks if the audio device is open.

Link copied to clipboard
abstract fun processFilters(samples: ShortArray, excludeFilter: Predicate<AudioFilter>?): ShortArray

Processes a provided audio samples through all applicable filters.

Link copied to clipboard
abstract fun reload()

Reloads (closes and opens) the audio device.

Link copied to clipboard
abstract fun removeFilter(filter: AudioFilter)

Removes an audio filter from the device.