SoundData:setSample

Modify a single sample in the SoundData. Sample indices start at zero, and samples should be between -1 and 1.

SoundData:setSample(index, value)

Arguments

NameTypeDescription
indexnumberThe index of the sample to set.
valuenumberThe new value of the sample.

Returns

Nothing

Notes

Note that samples for individual channels in stereo sounds are stored next to each other.

See also