i already use two buffers. whilst one is playing the other one is filled. with unque and que buffer the order of the buffers is altered.

But as jrsoftware says i have to poll the bufferstate for the source. there is no event for that in openal.

But as i found out sleep(1) works aswell. Just do not use sleep(0) as that locks up your pc.

@pyrogine you also use sleep. also i do not see you using an event as pointed out by mirage.