get
Returns the sample of channel in frame frame. Channel 0 is left, or the only channel of mono audio; channel 1 is right.
Throws
Samples
// Two stereo frames: left then right for each.
val samples = AudioSamples(floatArrayOf(0.1f, -0.1f, 0.5f, -0.5f), channels = 2, sampleRate = 48000)
assertPrints(samples.frameCount, "2")
assertPrints(samples[1, 0], "0.5")
assertPrints(samples[1, 1], "-0.5")Content copied to clipboard