1al_get_audio_stream_fragment(3)                al_get_audio_stream_fragment(3)
2
3
4

NAME

6       al_get_audio_stream_fragment - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_audio.h>
10
11              void *al_get_audio_stream_fragment(const ALLEGRO_AUDIO_STREAM *stream)
12

DESCRIPTION

14       When  using  Allegro's  audio  streaming, you will use this function to
15       continuously provide new sample data to a stream.
16
17       If the stream is ready for new  data,  the  function  will  return  the
18       address of an internal buffer to be filled with audio data.  The length
19       and format of the buffer are specified  with  al_create_audio_stream(3)
20       or  can be queried with the various functions described here.  Once the
21       buffer is filled, you must signal this to Allegro by passing the buffer
22       to al_set_audio_stream_fragment(3).
23
24       If the stream is not ready for new data, the function will return NULL.
25
26              Note:  If  you  listen  to  events  from  the  stream,  an ALLE‐
27              GRO_EVENT_AUDIO_STREAM_FRAGMENT event will be generated whenever
28              a  new  fragment  is  ready.  However, getting an event is not a
29              guarantee that al_get_audio_stream_fragment(3) will  not  return
30              NULL, so you still must check for it.
31

SEE ALSO

33       al_set_audio_stream_fragment(3),   al_get_audio_stream_event_source(3),
34       al_get_audio_stream_frequency(3),      al_get_audio_stream_channels(3),
35       al_get_audio_stream_depth(3), al_get_audio_stream_length(3)
36
37
38
39Allegro reference manual                       al_get_audio_stream_fragment(3)
Impressum