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

NAME

6       read_sound_input  -  Retrieves  the last recorded audio buffer. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int read_sound_input(void *buffer);
14

DESCRIPTION

16       Retrieves the most recently recorded audio buffer  into  the  specified
17       location.  The buffer size can be obtained by checking the return value
18       from start_sound_input(). You must be sure to  call  this  function  at
19       regular  intervals  during  the recording (typically around 100 times a
20       second), or some data will be lost. If you are unable to do this  often
21       enough  from  the  mainline  code,  use the digi_recorder() callback to
22       store the waveform into a larger buffer of your own.
23
24       Note: many cards produce  a  click  or  popping  sound  when  switching
25       between  record  and playback modes, so it is often a good idea to dis‐
26       card the first buffer after you start  a  recording.  The  waveform  is
27       always stored in unsigned format, with stereo data consisting of alter‐
28       nate left/right samples.
29

RETURN VALUE

31       The function will return non-zero if a buffer has been copied  or  zero
32       if no new data is yet available (you were too fast checking the input).
33
34

SEE ALSO

36       start_sound_input(3)
37
38
39
40Allegro                          version 4.4.3             read_sound_input(3)
Impressum