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