AL_PLAYING

Started by Arman, June 12, 2004, 12:43:09

Previous topic - Next topic

Arman

Hello,
I am using th following code to know if a source is still playing (each game frame)
AL10.alGetSourcei(sourceNumber, AL10.AL_PLAYING)

but it always return 0
Why?
Can you tell me if there is a standard/better way to know if a source is still playing
Thanks for your attention.

Matzon

Quote from: "Arman"Hello,
I am using th following code to know if a source is still playing (each game frame)
AL10.alGetSourcei(sourceNumber, AL10.AL_PLAYING)

but it always return 0
Why?

Actually you're getting an Invalid Enum error...

You need to check the AL_SOURCE_STATE flag:
AL10.alGetSourcei(sourceNumber, AL10.AL_SOURCE_STATE)

Arman

Thank you Matzon