Re: Problems with alSourceQueueBuffers on MacOSX

Eric Wing <[email protected]> Thu, 14 Jul 2011 14:15:35 -0700
Newsgroups gmane.comp.lib.openal
Message-ID <CA+Q62MBUoYhG=JnHdcXcABPR+pDnoEJ0gpJ1BMG4O2kqvWBMHA@mail.gmail.com>
On 7/14/11, Juan Miguel Martín Muñoz <[email protected]> wrote:
> Hi!
>
> I've this code to fill buffers with decode audio data
>
> // Is the buffer empty?
> alGetSourcei(uiSource, AL_BUFFERS_QUEUED, &iQueuedBuffers);
> if (iQueuedBuffers == 0)
> {
> // Fill all the Buffers with decoded audio data from the OggVorbis file
> for (iLoop = 0; iLoop < PS_NUM_BUFFERS; iLoop++)
> {
> ulBytesWritten = DecodeOggVorbis(&sOggVorbisFile, pDecodeBuffer,
> ulBufferSize, ulChannels);
> if (ulBytesWritten)
> {
> alBufferData(uiBuffers[iLoop], ulFormat, pDecodeBuffer, ulBytesWritten,
> ulFrequency);
> }
> }
> alGetError();
> alSourceQueueBuffers(uiSource, PS_NUM_BUFFERS, uiBuffers);
> ALenum err = alGetError();
> }
>
> // Start playing source
> alSourcePlay(uiSource);
>
> This code works fine on PC but on MacOSX (10.6) I ger an error code "-50"
> after alSourceQueueBuffers.
>
> Thanks in advance!
>

What does alGetString(err) say?
Does alGetError return an error for any of your other OpenAL commands?

Random guess: maybe you need more syntax:
alSourceQueueBuffers(uiSource, PS_NUM_BUFFERS, &uiBuffers);
or
alSourceQueueBuffers(uiSource, PS_NUM_BUFFERS, &uiBuffers[0]);

-Eric
-- 
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal