Skip to content

Instantly share code, notes, and snippets.

@sherief
Created November 23, 2013 01:18
Show Gist options
  • Save sherief/7609520 to your computer and use it in GitHub Desktop.
Save sherief/7609520 to your computer and use it in GitHub Desktop.
///////
check_al_error();
alGetSourcei(SourceID, AL_BUFFERS_PROCESSED, &SourceBuffersProcessed);
alGetSourcei(SourceID, AL_BUFFERS_QUEUED, &SourceBuffersQueued);
check_al_error();
//
printf("\tfill_and_queue_buffers pre-q - AL_BUFFERS_QUEUED: %d\n", SourceBuffersQueued);
printf("\tfill_and_queue_buffers pre-q - AL_BUFFERS_PROCESSED: %d\n", SourceBuffersProcessed);
check_al_error();
/////////
alSourceQueueBuffers(SourceID, 1, &Buffers[i]);
//////////
check_al_error();
alGetSourcei(SourceID, AL_BUFFERS_PROCESSED, &SourceBuffersProcessed);
alGetSourcei(SourceID, AL_BUFFERS_QUEUED, &SourceBuffersQueued);
check_al_error();
//
printf("\tfill_and_queue_buffers post-q - AL_BUFFERS_QUEUED: %d\n", SourceBuffersQueued);
printf("\tfill_and_queue_buffers post-q - AL_BUFFERS_PROCESSED: %d\n", SourceBuffersProcessed);
check_al_error();
Output:
fill_and_queue_buffers pre-q - AL_BUFFERS_QUEUED: 0
fill_and_queue_buffers pre-q - AL_BUFFERS_PROCESSED: 0
fill_and_queue_buffers post-q - AL_BUFFERS_QUEUED: 1
fill_and_queue_buffers post-q - AL_BUFFERS_PROCESSED: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment