NAME

Snack_PutSoundData, Snack_GetSoundData - transfer sound data between a buffer and a Snack sound

SYNOPSIS

#include <snack.h>
Snack_PutSoundData(sound, position, buffer, nBytes)
Snack_GetSoundData(sound, position, buffer, nBytes)

ARGUMENTS

Sound *sound (in)
int position (in)
void *buffer (in)
int nBytes (in)

DESCRIPTION

Snack_PutSoundData transfers nBytes bytes of sound data from buffer into a Snack sound at specified position.
The number of bytes is equal to the length of the created sound times the number of channels times the number of bytes per sample (2 for LIN16 otherwise 1) Also, the sound must be of the storage type SOUND_IN_MEMORY, i.e. the sound sample data must reside in memory. Snack_GetSoundData transfers data from the Snack sound to the buffer. This functions works both with memory resident sounds and sound linked to disk files (SOUND_IN_MEMORY and SOUND_IN_FILE).