LWJGL Forum

Programming => OpenAL => Topic started by: gimbal on December 08, 2005, 23:49:50

Title: javadoc alSourceUnqueueBuffers() incorrect?
Post by: gimbal on December 08, 2005, 23:49:50
I'm just beginning to learn OpenAL, but I think I have stumbled onto an incorrect javadoc entry for the mentioned function. The OpenAL programmers manual states the following:

Parameters:
source - the name of the source to unqueue buffers from
n - the number of buffers to be unqueued
buffers - a pointer to an array of buffer names that were removed

WERE removed, which tells me that alSourceUnqueueBuffers() determines the buffer names to be removed, not the game code. The game code only specifies the AMOUNT of buffers to remove (with 'n', which in LWJGL is the amount of remaining integers in the IntBuffer).

Yet the javadoc states the following:

Parameters:
source - source to unqueue buffers from
buffers - buffers to be unqueued

Like you have to specify yourself which buffers should be unqueued.

Am I reading the OpenAL docs wrong, or is the javadoc incorrect / missing some details? If I am reading the OpenAL docs correctly, then all you have to do is:

1) query the AL_BUFFERS_PROCESSED value using alGetSourcei()
2) create an IntBuffer of size 'AL_BUFFERS_PROCESSED'
3) call alSourceUnqueueBuffers() and pass the created IntBuffer

Then after the call is completed the IntBuffer contains all the names of the buffers that were unqueued, right?
Title: javadoc alSourceUnqueueBuffers() incorrect?
Post by: Matzon on December 09, 2005, 06:26:42
yes you are right. I'll update the java doc to:
buffers - IntBuffer containing list of names that were unqueued
Title: javadoc alSourceUnqueueBuffers() incorrect?
Post by: gimbal on December 09, 2005, 15:03:23
Thanks for verifying it :)

(I was pretty much sure anyway)