AudioSamples

class AudioSamples(val channels: Int, val totalSamples: Int, val data: Array<ShortArray> = Array(channels) { ShortArray(totalSamples) }) : IAudioSamples

Constructors

Link copied to clipboard
constructor(channels: Int, totalSamples: Int, data: Array<ShortArray> = Array(channels) { ShortArray(totalSamples) })

Properties

Link copied to clipboard
open override val channels: Int
Link copied to clipboard
Link copied to clipboard
open override val totalSamples: Int

Functions

Link copied to clipboard
fun clone(out: AudioSamples = AudioSamples(channels, totalSamples, Array(data.size) { ShortArray(data[0].size) })): AudioSamples
Link copied to clipboard
Link copied to clipboard
fun copyTo(that: AudioSamples)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun get(channel: Int): ShortArray
open operator override fun get(channel: Int, sample: Int): Short
Link copied to clipboard
open fun getFloat(channel: Int, sample: Int): Float
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun AudioSamples.interleaved(out: AudioSamplesInterleaved = AudioSamplesInterleaved(channels, totalSamples)): AudioSamplesInterleaved
fun IAudioSamples.interleaved(out: AudioSamplesInterleaved = AudioSamplesInterleaved(channels, totalSamples)): AudioSamplesInterleaved
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun isNotEmpty(): Boolean
Link copied to clipboard
fun AudioSamples.resample(srcFreq: Int, dstFreq: Int): AudioSamples
Link copied to clipboard
Link copied to clipboard
open override fun scaleVolume(scale: Float): AudioSamples
open override fun scaleVolume(channelScales: FloatArray): AudioSamples
open fun scaleVolume(scale: Double): IAudioSamples
open fun scaleVolume(channelScales: DoubleArray): IAudioSamples
Link copied to clipboard
fun IAudioSamples.separated(out: AudioSamples = AudioSamples(channels, totalSamples)): AudioSamples
Link copied to clipboard
open operator override fun set(channel: Int, sample: Int, value: Short)
Link copied to clipboard
open fun setFloat(channel: Int, sample: Int, value: Float)
Link copied to clipboard
open fun setFloatStereo(sample: Int, l: Float, r: Float)
Link copied to clipboard
fun setStereo(sample: Int, valueLeft: Short, valueRight: Short)
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String