get_audio_stream_buffer man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

get_audio_stream_buffer(3)	Allegro manual	    get_audio_stream_buffer(3)

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 creating
       the  stream)  to that address, for example using an fread() from a disk
       file.  After filling the buffer with data, call	free_audio_stream_buf‐
       fer() to indicate that the new data is now valid.

SEE ALSO
       play_audio_stream(3), free_audio_stream_buffer(3), exstream(3)

Allegro				 version 4.4.2	    get_audio_stream_buffer(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net