AudioData

class AudioData(val rate: Int, val samples: AudioSamples, val name: String? = null) : Extra

Constructors

Link copied to clipboard
constructor(rate: Int, samples: AudioSamples, name: String? = 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
Link copied to clipboard
val name: String?
Link copied to clipboard
val rate: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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
operator fun get(channel: Int): AudioSampleArray
operator fun get(channel: Int, sample: Int): AudioSample
Link copied to clipboard
Link copied to clipboard
operator fun set(channel: Int, sample: Int, value: AudioSample)
Link copied to clipboard
fun timeAtSample(sample: Int): Duration
Link copied to clipboard
suspend fun AudioData.toSound(soundProvider: NativeSoundProvider = nativeSoundProvider): Sound
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard

Change the rate, changing the pitch and the duration of the sound.