1create_sample(3)                Allegro manual                create_sample(3)
2
3
4

NAME

6       create_sample  -  Constructs  a  new  sample structure of the specified
7       type. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       SAMPLE *create_sample(int bits, int stereo, int freq, int len);
14

DESCRIPTION

16       Constructs a new sample structure of the specified type.  Read  chapter
17       "Structures  and  types defined by Allegro" for an internal description
18       of the SAMPLE structure. The `bits' parameter can be 8 or 16,  `stereo'
19       can be zero for mono samples and non-zero for stereo samples, `freq' is
20       the frequency in hertz, and `len' is the number of samples you want  to
21       allocate for the full sound buffer.
22

RETURN VALUE

24       Returns  a  pointer  to the created sample, or NULL if the sample could
25       not be created. Remember to free this  sample  later  to  avoid  memory
26       leaks.
27
28

SEE ALSO

30       load_sample(3), destroy_sample(3)
31
32
33
34Allegro                          version 4.4.3                create_sample(3)
Impressum