LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Arman on June 12, 2004, 12:43:09

Title: AL_PLAYING
Post by: Arman on June 12, 2004, 12:43:09
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.
Title: Re: AL_PLAYING
Post by: Matzon on June 12, 2004, 14:22:20
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)
Title: AL_PLAYING
Post by: Arman on June 12, 2004, 16:15:44
Thank you Matzon