centos man page for get_audio_stream_buffer

Query: get_audio_stream_buffer

OS: centos

Section: 3alleg4

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

get_audio_stream_buffer(3alleg4)				  Allegro manual				  get_audio_stream_buffer(3alleg4)

NAME
get_audio_stream_buffer - Tells you if you need to fill the audiostream or not. Allegro game programming library.
SYNOPSIS
#include <allegro.h> void *get_audio_stream_buffer(AUDIOSTREAM *stream);
DESCRIPTION
You must call this function at regular intervals while an audio stream is playing, to provide the next buffer of sample data (the smaller the stream buffer size, the more often it must be called). This function should not be called from a timer handler. Example: void *mem_chunk; ... while (TRUE) { ... mem_chunk = get_audio_stream_buffer(buffer); if (mem_chunk != NULL) { /* Refill the stream buffer. */ } }
RETURN VALUE
If it returns NULL, the stream is still playing the previous lot of data, so you don't need to do anything. If it returns a value, that is the location of the next buffer to be played, and you should load the appropriate number of samples (however many you specified when creat- ing the stream) to that address, for example using an fread() from a disk file. After filling the buffer with data, call free_audio_stream_buffer() to indicate that the new data is now valid.
SEE ALSO
play_audio_stream(3alleg4), free_audio_stream_buffer(3alleg4), exstream(3alleg4) Allegro version 4.4.2 get_audio_stream_buffer(3alleg4)
Related Man Pages
get_audio_stream_buffer(3alleg4) - debian
play_audio_stream(3alleg4) - debian
play_audio_stream(3alleg4) - suse
exstream(3alleg4) - php
exstream(3alleg4) - linux
Similar Topics in the Unix Linux Community
Retreiving live data
I don't know how to replace input char with appropriate integer