Sound:getFrame

Edit

Returns a single audio frame in the Sound.

... = Sound:getFrame(offset)

Arguments

NameTypeDescription
offsetnumber An offset in the sound to read from (0 is the first frame).

Returns

NameTypeDescription
...number The frame of audio, with 1 number for each channel.

Notes

Sounds with a sample format of f32 will have samples between -1 and 1. For the i16 format, samples will be between -32768 and 32767.

See also