AlContextAudioDevice

Represents an OpenAL audio device with context.

Inheritors

Properties

Link copied to clipboard
abstract val contextPointer: Long

Gets the pointer to the OpenAL context associated with this device.

Link copied to clipboard
abstract val devicePointer: Long

Gets the pointer to the OpenAL audio device.

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.

Link copied to clipboard
abstract suspend fun runInContext(runnable: suspend () -> Unit)

Runs a runnable in the context of the OpenAL audio device.

Link copied to clipboard
abstract fun runInContextAsync(runnable: Runnable): CompletableFuture<Void?>

Runs the runnable in the context of the OpenAL audio device.

Link copied to clipboard
open fun runInContextBlocking(runnable: Runnable): Void?

Runs the runnable in the context of the OpenAL audio device, blocking the current thread until it completes.