   OpenAL, is there something wrong with this code snippet?
  I'm investigating how can i correctly create a source,buffers, queue buffers and then release the buffers for the source, so that i can reuse it with other buffers. The following code though does not seem to output the correct thing. Here it is:pDevice = alcOpenDevice(NULL);pContext = alcCreateContext(pDevice, NULL);alcMakeContextCurrent(pContext);ALuint source;alGenSources(1, &source);assert(alGetError() == AL_NO_ERROR);char asdo[10240] = {0}, asdo2[10240] = {0};ALuint buffers[2],uq[2];alGenBuffers(2, buffers);assert(alGetError() == AL_NO_ERROR);alBufferData(buffers[0], AL_FORMAT_MONO16, asdo, 10240, 22100);assert(alGetError() == AL_NO_ERROR);alBufferData(buffers[1], AL_FORMAT_MONO16, asdo2, 10240, 22100);assert(alGetError() == AL_NO_ERROR);alSourceQueueBuffers(source, 1, &buffers[0]);assert(alGetError() == AL_NO_ERROR);alSourceQueueBuffers(source, 1, &buffers[1]);assert(alGetError() == AL_NO_ERROR);ALint q;alGetSourcei(source, AL_BUFFERS_QUEUED, &q);assert(alGetError() == AL_NO_ERROR);printf("q=%d\n", q);alSourcePlay(source); // playassert(alGetError() == AL_NO_ERROR);alSourceStop(source); // stopassert(alGetError() == AL_NO_ERROR);alSourceUnqueueBuffers(source, 1, &uq[0]);assert(alGetError() == AL_NO_ERROR);alSourceUnqueueBuffers(source, 1, &uq[1]);assert(alGetError() == AL_NO_ERROR);q = -1;alGetSourcei(source, AL_BUFFERS_QUEUED, &q);printf("q=%d Error=%d - %d %d - %d %d\n", q, alGetError(), uq[0], uq[1], buffers[0], buffers[1]);It says:q=2q=2 Error=0 - 2401 2401 - 2401 2402Why is it the second q still 2? I thought it had to be 0, because there are no more buffers queued.Edit: i'm running this on the iPad simulator on a mac.   