« Return to Thread: Buffer size problem

Re: Buffer size problem

by Jimmy Gervais :: Rate this Message:

Reply to Author | View in Thread

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@...>
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


_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Buffer size problem