SoundData:getSample
Returns a single sample from the SoundData. Sample indices start at 0, and the returned value will be between -1 and 1.
value = SoundData:getSample(index)
Arguments
Name | Type | Description |
index | number | The index of the sample to get. |
Returns
Name | Type | Description |
value | number | A number indicating the value of the sample at the given index. |
Notes
Note that samples for individual channels in stereo sounds are stored next to each other.
See also
SoundData:getSampleCount
SoundData:getSampleRate
SoundData:setSample
SoundData