File: al_get_audio_stream_fragment.3

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (41 lines) | stat: -rw-r--r-- 1,403 bytes parent folder | download
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
.TH al_get_audio_stream_fragment 3 "" "Allegro reference manual"
.SH NAME
.PP
al_get_audio_stream_fragment \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_audio.h>

void\ *al_get_audio_stream_fragment(const\ ALLEGRO_AUDIO_STREAM\ *stream)
\f[]
.fi
.SH DESCRIPTION
.PP
When using Allegro\[aq]s audio streaming, you will use this function to
continuously provide new sample data to a stream.
.PP
If the stream is ready for new data, the function will return the
address of an internal buffer to be filled with audio data.
The length and format of the buffer are specified with
al_create_audio_stream(3) or can be queried with the various functions
described here.
Once the buffer is filled, you must signal this to Allegro by passing
the buffer to al_set_audio_stream_fragment(3).
.PP
If the stream is not ready for new data, the function will return NULL.
.RS
.PP
\f[I]Note:\f[] If you listen to events from the stream, an
ALLEGRO_EVENT_AUDIO_STREAM_FRAGMENT event will be generated whenever a
new fragment is ready.
However, getting an event is \f[I]not\f[] a guarantee that
al_get_audio_stream_fragment(3) will not return NULL, so you still must
check for it.
.RE
.SH SEE ALSO
.PP
al_set_audio_stream_fragment(3), al_get_audio_stream_event_source(3),
al_get_audio_stream_frequency(3), al_get_audio_stream_channels(3),
al_get_audio_stream_depth(3), al_get_audio_stream_length(3)