al_drain_audio_stream
void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
Introduced in 5.0.0
You should call this to finalise an audio stream that you will no longer be feeding, to wait for all pending buffers to finish playing. The stream's playing state will change to false.
Examples: ex_saw, ex_stream_seek
Most helpful discussions: