[Openal] alSourceQueueBuffers Report Error
steve
steve at astrocorp.com.tw
Thu Oct 26 19:04:11 PDT 2006
Hi:
My program runs fine on release version. But OpenAL reports error on my
debug version.
I am trying to play recoded voices continueously, so I queue the buffer
while the souce is playing.
For Debug version, I got an "Invalid operation" error from OpenAL and an
exception is thrown.
Note that my release verison runs fine.
Could someone tell me what's wrong with my program?
Thank you very much.
Steve
==========================================
My code:
class Buffer
{
ALuint m_id[8]; // OpanAL id,
};
class Source
{
ALuint m_id; // OpanAL id,
};
void Source::QueueBuffer (Buffer *pBuf)
{
ALint id = pBuf->Id ()[0];
alSourceQueueBuffers (m_id, 1, (const ALuint*)&id);
ALErrorCheck ();
}
void Source::ALErrorCheck ()
{
int error = alGetError ();
if (error != AL_NO_ERROR)
{
char szErr[512];
MakeErrorString (szErr, "", error);
throw string (szErr);
}
}
More information about the Openal
mailing list