[Openal-devel] ALC_EXT_STATIC_BUFFER

Chris Robinson chris.kcat at gmail.com
Thu Jul 9 14:05:34 PDT 2009


On Thursday 09 July 2009 1:19:30 pm Bob Aron wrote:
> With alBufferData() this is true, because the implementation has
> copied the data into it's own buffers.
> With alBufferDataStatic(), it is not true because the implementation
> may be referencing the data buffer provided by the client.
> Before the client can delete the data buffer provided to
> alBufferDataStatic() , a successful (as in alGetError() returns no
> error) call to alDeleteBuffers(), alBufferData(), or alBufferDataStatic
> () must be made. This lets the client know the implementation is not
> using the data because it allowed the OpenAL Buffer to be deleted or
> modified.

Yeah, sorry, I didn't mean to imply you can change/delete the data after 
calling alBufferDataStatic, but rather, that when the OpenAL function returns, 
the request should be completed as far as the user code is concerned. Eg. you 
have a buffer set with alBufferDataStatic.. the buffer should be removed from 
the source queue by the time alSourceUnqueueData returns and another 
al*Buffer* call tries to work on it, and once alDeleteBuffers returns, the 
buffer data pointer should be immediately free to be changed). The app 
shouldn't have to do any waiting in between the calls.


More information about the Openal-devel mailing list