« Return to Thread: Why does alDeleteBuffers gives a AL_INVALID_OPERATION error?

Re: Why does alDeleteBuffers gives a AL_INVALID_OPERATION error?

by Chris Robinson-5 :: Rate this Message:

Reply to Author | View in Thread

On Saturday 21 March 2009 6:24:33 am Mentalray wrote:

> Hi,
>
> I'm using OpenAL for an iPhone application, but I'm having a weird issue.
> At some point I need to clear all of the queued buffers from one source.
> Here's how I proceed (simplified version of the code):
>
> alSourceStop( sourceId );
> alGetSourcei( sourceId, AL_BUFFERS_PROCESSED, &numProcessed );
> while( numProcessed-- ) {
>     alSourceUnqueueBuffers( sourceId, 1, &bufferId );
>     alDeleteBuffers( 1, bufferId ); // this fails with AL_INVALID_OPERATION
> }
>
> >From what I understand, AL_INVALID_OPERATION is returned from
>
> alDeleteBuffers when the buffer is still in use.  This is not the case
> here.

That should be:
alDeleteBuffers( 1, &bufferId );
since it takes a pointer to a list of buffers (though since you only specify
1, it's a list of one, hence a pointer to a single buffer).
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

 « Return to Thread: Why does alDeleteBuffers gives a AL_INVALID_OPERATION error?