SoundAudioStream

class SoundAudioStream(coroutineContext: CoroutineContext, val stream: AudioStream, var soundProvider: NativeSoundProvider, val closeStream: Boolean = false, val name: String = stream.name ?: "Unknown", val onComplete: suspend () -> Unit? = null) : Sound

Constructors

Link copied to clipboard
constructor(coroutineContext: CoroutineContext, stream: AudioStream, soundProvider: NativeSoundProvider, closeStream: Boolean = false, name: String = stream.name ?: "Unknown", onComplete: suspend () -> Unit? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open override var extra: ExtraType
Link copied to clipboard
open override val length: Duration
Link copied to clipboard
open override val name: String
Link copied to clipboard
Link copied to clipboard
open override val nchannels: Int
Link copied to clipboard
val onComplete: suspend () -> Unit?
Link copied to clipboard
open override var panning: Double
Link copied to clipboard
open override var pitch: Double
Link copied to clipboard
open override var position: Vector3
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var volume: Double

Functions

Link copied to clipboard
open suspend override fun decode(maxSamples: Int = DEFAULT_MAX_SAMPLES): AudioData
Link copied to clipboard
suspend fun SoundProps.fadeIn(time: Duration = DEFAULT_FADE_TIME, easing: Easing = DEFAULT_FADE_EASING)
Link copied to clipboard
suspend fun SoundProps.fadeOut(time: Duration = DEFAULT_FADE_TIME, easing: Easing = DEFAULT_FADE_EASING)
Link copied to clipboard
suspend fun SoundProps.fadeTo(volume: Double, time: Duration = DEFAULT_FADE_TIME, easing: Easing = DEFAULT_FADE_EASING)
Link copied to clipboard
open override fun play(coroutineContext: CoroutineContext, params: PlaybackParameters = PlaybackParameters.DEFAULT): SoundChannel
open suspend fun play(params: PlaybackParameters = PlaybackParameters.DEFAULT): SoundChannel
open suspend fun play(times: PlaybackTimes, startTime: Duration = 0.seconds): SoundChannel
open fun play(coroutineContext: CoroutineContext, times: PlaybackTimes, startTime: Duration = 0.seconds): SoundChannel
Link copied to clipboard
open suspend fun playAndWait(params: PlaybackParameters, progress: SoundChannel.(current: Duration, total: Duration) -> Unit = { current, total -> })
open suspend fun playAndWait(times: PlaybackTimes = 1.playbackTimes, startTime: Duration = 0.seconds, progress: SoundChannel.(current: Duration, total: Duration) -> Unit = { current, total -> })
Link copied to clipboard
open suspend fun playForever(startTime: Duration = 0.seconds): SoundChannel
open fun playForever(coroutineContext: CoroutineContext, startTime: Duration = 0.seconds): SoundChannel
Link copied to clipboard
fun playNoCancel(times: PlaybackTimes = PlaybackTimes.ONE, startTime: Duration = 0.seconds): SoundChannel
Link copied to clipboard
fun playNoCancelForever(startTime: Duration = 0.seconds): SoundChannel
Link copied to clipboard
suspend fun toAudioData(maxSamples: Int = DEFAULT_MAX_SAMPLES): AudioData
Link copied to clipboard
open suspend override fun toStream(): AudioStream
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
suspend fun AudioStreamable.withEcho(bufferLen: Int = 2048, config: AudioStreamEchoConfig = AudioStreamEchoConfig()): Sound
Link copied to clipboard
suspend fun AudioStreamable.withProcessor(block: suspend (inp: AudioStream, outp: AudioSamplesDeque) -> Unit): Sound