[Openal] Buffer size problem

Jimmy Gervais jimbo8086 at gmail.com
Sat Jul 4 03:05:57 PDT 2009


Yeah I meant AL_INITIAL sorry. I take good note of your advices.

By the way, I have the OpenAl Programmer's guide and Specification, but it
seems to be limited to AL.h. I'd like to use ALC or ALEXT, especially
because right now I'm limited to STEREO16 but I know Alext.h includes other
formats with higher bitrates. What should I do? Study the headers?



2009/7/4 Chris Robinson <chris.kcat at gmail.com>

> 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 at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20090704/a8f5bf7f/attachment.html


More information about the Openal mailing list