Allegro 5 api
#include <allegro5/allegro_audio.h> unsigned int al_get_available_audio_stream_fragments( const ALLEGRO_AUDIO_STREAM *stream)
Returns the number of available fragments in the stream, that is, fragments which are not currently filled with data for playback.
al_get_audio_stream_fragment(3alleg5), al_get_audio_stream_fragments(3alleg5)