Sign in to follow this  

OpenAL - Retrieve true/false if source is playing?

Recommended Posts

Im using openal and im trying to play and loop a source however my call to play the source is required to be in a block of code that is frequently called so instead of making it start again and again i need to create an if statement to check to see if its already playing any ideas how?
	if(    ** source[9] isnt playing ** )

Also anyone know any good websites that i can get information like this from?

Share this post

Link to post
Share on other sites
You can query information about the source(like state information) using alGetSourcei(). The state information will tell you it the source is stopped or not.

I believe there are openal tutorials on this site or you can download docs included with the SDK here.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this