On Saturday 04 July 2009 1:29:27 am Jimmy Gervais wrote:
> Also, I noted that when the buffer is too small, that being under 8192, the
> Source State is AL_INITIATE, so looking for AL_STOPPED only is no good.
It should only be AL_INITIAL if it hasn't been started. If alBufferData fails,
then alSourcei(LaSource[0], AL_BUFFER, MesTampons[0]); and
alSourcePlay(LaSource[0]); will both fail too, leaving the source in an
AL_INITIAL state. Be sure to regularly check for errors using alGetError()
after calls which can fail (the need to do that can be mitigated by verifying
parameters before calling the al* functions, though some functions, like
alGenSources and alSourcei(..., AL_BUFFER, ...) can still generate an error).
In particular, the buffer size passed to alBufferData needs to be a multiple
of the block size (eg. multiple of 4 for STEREO16).
_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal