Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class AudioSamplesProcessor(val channels: Int, val totalSamples: Int, val data: Array<FloatArray> = Array(channels) { FloatArray(totalSamples) })
Link copied to clipboard
abstract class AudioStream(val rate: Int, val channels: Int, val name: String? = null) : AudioStreamable, AutoCloseable
Link copied to clipboard
interface AudioStreamable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class PlaybackParameters(val times: PlaybackTimes = 1.playbackTimes, val startTime: Duration = 0.seconds, val bufferTime: Duration = 0.25.seconds, val volume: Double = 1.0, val pitch: Double = 1.0, val panning: Double = 0.0, val position: Vector3 = Vector3.ZERO, val onCancel: () -> Unit? = null, val onFinish: () -> Unit? = null) : ReadonlySoundProps
Link copied to clipboard
Link copied to clipboard
abstract class Sound(val creationCoroutineContext: CoroutineContext) : SoundProps, SoundPlay, AudioStreamable, Extra
Link copied to clipboard
class SoundAudioData(coroutineContext: CoroutineContext, val audioData: AudioData, var soundProvider: NativeSoundProvider, val name: String = audioData.name ?: "Unknown") : Sound
Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class SoundChannelGroup(volume: Double = 1.0, pitch: Double = 1.0, panning: Double = 0.0) : SoundChannelBase, SoundChannelPlay, Extra
Link copied to clipboard
interface SoundChannelPlay
Link copied to clipboard
Properties
Functions
Link copied to clipboard
fun AudioSamplesInterleaved.applyProps(speed: Double, panning: Double, volume: Double): AudioSamplesInterleaved
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun SoundChannel.await(progress: SoundChannel.(current: Duration, total: Duration) -> Unit = { current, total -> })
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun NativeSoundProvider.createNonStreamingSound(data: AudioData, name: String = "Unknown"): Sound
Link copied to clipboard
suspend fun NativeSoundProvider.createSound(file: FinalVfsFile, streaming: Boolean = false, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): Sound
suspend fun NativeSoundProvider.createSound(file: VfsFile, streaming: Boolean = false, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): Sound
suspend fun NativeSoundProvider.createSound(data: AudioData, formats: AudioFormats = defaultAudioFormats, streaming: Boolean = false, name: String = "Unknown"): Sound
suspend fun NativeSoundProvider.createSound(vfs: Vfs, path: String, streaming: Boolean = false, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): Sound
suspend fun NativeSoundProvider.createSound(data: ByteArray, streaming: Boolean = false, props: AudioDecodingProps = AudioDecodingProps.DEFAULT, name: String = "Unknown"): Sound
Link copied to clipboard
suspend fun NativeSoundProvider.createStreamingSound(stream: AudioStream, closeStream: Boolean = false, name: String = "Unknown", onComplete: suspend () -> Unit? = null): Sound
Link copied to clipboard
suspend fun AudioData.encodeToByteArray(format: AudioFormat = WAV, props: AudioEncodingProps = AudioEncodingProps.DEFAULT): ByteArray
Link copied to clipboard
suspend fun AudioData.encodeToFile(file: VfsFile, format: AudioFormats = defaultAudioFormats, props: AudioEncodingProps = AudioEncodingProps.DEFAULT)
Link copied to clipboard
suspend fun AudioData.encodeToStream(out: AsyncOutputStream, format: AudioFormat = WAV, props: AudioEncodingProps = AudioEncodingProps.DEFAULT)
Link copied to clipboard
Link copied to clipboard
fun AudioSamples.interleaved(out: AudioSamplesInterleaved = AudioSamplesInterleaved(channels, totalSamples)): AudioSamplesInterleaved
Link copied to clipboard
suspend fun NativeSoundProvider.playAndWait(stream: AudioStream, params: PlaybackParameters = PlaybackParameters.DEFAULT)
suspend fun AudioStream.playAndWait(times: PlaybackTimes = 1.playbackTimes, startTime: Duration = 0.seconds, bufferTime: Duration = 0.1.seconds)
Link copied to clipboard
suspend fun VfsFile.readAudioData(formats: AudioFormat = defaultAudioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioData
Link copied to clipboard
suspend fun VfsFile.readAudioStream(formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioStream
Link copied to clipboard
suspend fun VfsFile.readAudioStreamOrNull(formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioStream?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun AudioSamplesInterleaved.separated(out: AudioSamples = AudioSamples(channels, totalSamples)): AudioSamples
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun AudioStream.withProcessor(block: suspend (inp: AudioStream, outp: AudioSamplesDeque) -> Unit): AudioStream
suspend fun AudioStreamable.withProcessor(block: suspend (inp: AudioStream, outp: AudioSamplesDeque) -> Unit): Sound
Link copied to clipboard
suspend fun VfsFile.writeAudio(data: AudioData, formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioEncodingProps = AudioEncodingProps.DEFAULT)