AlContextOutputDevice

Represents an OpenAL audio output device with context.

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
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): AlSource

Creates a new audio source associated with this output device.

Link copied to clipboard
abstract fun disableHrtf()

Disables HRTF for this audio device.

Link copied to clipboard
abstract fun enableHrtf()

Enables HRTF for this audio device.

Link copied to clipboard

Gets the collection of audio filters applied to the device.

Link copied to clipboard
abstract fun isHrtfEnabled(): Boolean

Checks if HRTF is currently enabled for this audio device.

Link copied to clipboard
abstract fun isHrtfSupported(): Boolean

Checks if HRTF support is available for this audio 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.