<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) [Netscape]"> <title>SoundData</title> </head> <body> <h3> NAME</h3> Snack_PutSoundData, Snack_GetSoundData - transfer sound data between a buffer and a Snack sound <h3> SYNOPSIS</h3> #include <snack.h> <br><b>Snack_PutSoundData</b>(sound, position, buffer, nSamples) <br><b>Snack_GetSoundData</b>(sound, position, buffer, nSamples) <h3> ARGUMENTS</h3> Sound *sound (in) <br>int position (in) <br>void *buffer (in) <br>int nSamples (in) <h3> DESCRIPTION</h3> <b>Snack_PutSoundData</b> transfers <i>nSamples</i> samples of sound data from <i>buffer</i> into a Snack <i>sound</i> at specified <i>position</i>. The buffer data is expected to be in float or double format depending on the precision of the Snack sound. <br>The sound must be of storage type SOUND_IN_MEMORY, i.e. the sound sample data must reside in memory. <b>Snack_GetSoundData</b> transfers data from the Snack sound to the buffer. These functions work both with memory resident sounds and sounds linked to disk files (SOUND_IN_MEMORY and SOUND_IN_FILE). The buffer data is returned in float or double format depending on the precision of the Snack sound. <br> </body> </html>