Allegro 5 api
#include <allegro5/allegro_audio.h> unsigned int al_get_audio_stream_fragments(const ALLEGRO_AUDIO_STREAM *stream)
Returns the number of fragments this stream uses. This is the same value as passed to al_create_audio_stream(3alleg5) when a new stream is created.
al_get_available_audio_stream_fragments(3alleg5)