NAMESnack_GetSample, Snack_SetSample - macros to set/get sample values of Snack sound objects
Snack_GetSample(sound, channel, index)
Snack_SetSample(sound, channel, index, value)
ARGUMENTSSound *sound (in)
A pointer to a sound object to query or modify
int channel (in)
A positive index selecting a channel. 0 = left, 1 = right.
int index (in)
A positive index pointing to a sound sample
float value (in)
The sample value as a float.
DESCRIPTIONThe following functions are implemented as macros for performance reasons. Snack_GetSample returns the sample value at index of channel. Snack_SetSample sets the sample at index of channel to value. No check is made that index, channel or value are valid values. These functions work only with memory resident sounds (SOUND_IN_MEMORY ). Block transfers can be accomplished more efficiently using the functions Snack_PutSoundData and Snack_GetSoundData.