On Sat, Mar 21, 2009 at 1:36 PM, Chris Robinson
<chris.kcat@...> wrote:
> alSourceStop( sourceId );
> alGetSourcei( sourceId, AL_BUFFERS_PROCESSED, &numProcessed );
> while( numProcessed-- ) {
> alSourceUnqueueBuffers( sourceId, 1, &bufferId );
> alDeleteBuffers( 1, bufferId ); // this fails with AL_INVALID_OPERATION
> }
>
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).
I'm sorry, I didn't transcript the original program properly. I'm actually passing &bufferId to the alDeleteBuffers function, but I still get the error.
I've noticed something weird though. If I add a sleep (I used a 1 sec sleep) between the alSourceUnqueueBuffers and the alDeleteBuffers function, it works fine. The problem only seem to occur if the delete function occurs too fast.
I'm really perplexed by this. Does it sounds like an implementation bug?
Many thanks for your help,
Martin
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel