File: SoundSamp.html

package info (click to toggle)
snack 2.2.9-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,628 kB
  • ctags: 3,536
  • sloc: ansic: 35,290; sh: 8,950; tcl: 1,037; python: 701; makefile: 490
file content (44 lines) | stat: -rwxr-xr-x 1,521 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!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]">
   <meta name="Author" content="Kre Sjlander">
   <title>SoundSamp</title>
</head>
<body>

<h3>
NAME</h3>
Snack_GetSample, Snack_SetSample - macros to set/get sample values of Snack
sound objects
<h3>
SYNOPSIS</h3>
#include &lt;snack.h>
<br><b>Snack_GetSample</b>(sound, channel, index)
<br><b>Snack_SetSample</b>(sound, channel, index, value)
<h3>
ARGUMENTS</h3>
Sound *sound (in)
<br>&nbsp;&nbsp;&nbsp; A pointer to a sound object to query or modify
<br>int channel (in)
<br>&nbsp;&nbsp;&nbsp; A positive index selecting a channel. 0 = left,
1 = right.
<br>int index (in)
<br>&nbsp;&nbsp;&nbsp; A positive index pointing to a sound sample
<br>float value (in)
<br>&nbsp;&nbsp;&nbsp; The sample value as a float.
<h3>
DESCRIPTION</h3>
The following functions are implemented as macros for performance reasons.
<b>Snack_GetSample</b>
returns the sample value at <i>index</i> of <i>channel</i>.
<b>Snack_SetSample</b>
sets the sample at <i>index</i> of <i>channel</i> to <i>value</i>. No check
is made that
<i>index, channel</i> or <i>value</i> 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.
</body>
</html>