Allegro 5 api
#include <allegro5/allegro_audio.h> unsigned int al_get_voice_position(const ALLEGRO_VOICE *voice)
When the voice has a non-streaming object attached to it, e.g. a sample, returns the voice\[aq]s current sample position. Otherwise, returns zero.
al_set_voice_position(3alleg5).