AlSource

Represents an OpenAL audio source.

Types

Link copied to clipboard
enum State

Functions

Link copied to clipboard
abstract fun clearBuffer()

Clears the audio buffer.

Link copied to clipboard

Closes the audio source asynchronously.

Link copied to clipboard
abstract fun getChannels(): Int
Gets the number of channels.
Link copied to clipboard
@NotNull
abstract fun getDevice(): @NotNull AlContextAudioDevice
Gets the OpenAL audio device associated with this source.
Link copied to clipboard
abstract fun getFloat(param: Int): Float
Gets a float parameter of the audio source.
Link copied to clipboard
abstract fun getFloatArray(param: Int, values: Array<Float>)
Gets a float array parameters of the audio source.
Link copied to clipboard
abstract fun getFormat(): Int
Gets the OpenAL format of the source.
Link copied to clipboard
abstract fun getInt(param: Int): Int
Gets an integer parameter of the audio source.
Link copied to clipboard
abstract fun getIntArray(param: Int, values: Array<Int>)
Gets an integer array parameters of the audio source.
Link copied to clipboard
abstract fun getPitch(): Float
Gets the pitch of the audio source.
Link copied to clipboard
abstract fun getPointer(): Long
Gets the pointer of OpenAL audio source.
Link copied to clipboard
@NotNull
abstract fun getState(): @NotNull AlSource.State
Gets the current state of the audio source.
Link copied to clipboard
abstract fun getVolume(): Float
Gets the volume of the audio source.
Link copied to clipboard
abstract fun isClosed(): Boolean

Checks if the audio source is closed.

Link copied to clipboard
abstract fun isRelative(): Boolean
Checks if the audio source is in relative mode.
Link copied to clipboard
abstract fun pause()
Pauses playback of the audio source.
Link copied to clipboard
abstract fun play()
Starts playback of the audio source.
Link copied to clipboard
abstract fun setCloseTimeoutMs(timeoutMs: Long)
Sets the timeout in milliseconds for the audio source to close.
Link copied to clipboard
abstract fun setFloat(param: Int, value: Float)
Sets a float parameter of the audio source.
Link copied to clipboard
abstract fun setFloatArray(param: Int, values: Array<Float>)
Sets a float array parameters of the audio source.
Link copied to clipboard
abstract fun setInt(param: Int, value: Int)
Sets an integer parameter of the audio source.
Link copied to clipboard
abstract fun setIntArray(param: Int, values: Array<Int>)
Sets an integer array parameters of the audio source.
Link copied to clipboard
abstract fun setPitch(pitch: Float)
Sets the pitch of the audio source.
Link copied to clipboard
abstract fun setRelative(relative: Boolean)
Sets the audio source to relative mode.
Link copied to clipboard
abstract fun setVolume(volume: Float)
Sets the volume of the audio source.
Link copied to clipboard
abstract fun stop()
Stops playback of the audio source.
Link copied to clipboard
abstract fun updateLastBufferTime()
Updates last buffer time to current time provided by the time supplier.
Link copied to clipboard
abstract fun write(samples: Array<Short>, applyFilters: Boolean)

Writes audio samples to the source.