AudioDevice

interface AudioDevice

Represents an audio device used for audio input or output.

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
abstract 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

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.