Problems with alSourceQueueBuffers on MacOSX

Juan Miguel Martín Muñoz <[email protected]> Thu, 14 Jul 2011 11:23:40 +0200
Newsgroups gmane.comp.lib.openal
Message-ID <CADN8KfRpky3Pt=q=G2hOQQO-4spdd81fEA4eab2MzdwDnMuTdg@mail.gmail.com>
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!

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