Code: Select all
IrrlichtDevice *device = createDevice(video::EDT_OPENGL, dimension2d<s32>(480, 320), 16, false, false, false, 0);
Code: Select all
while(device->run())
{
app->Update();
}
However my issue is with OpenAL. No matter what I do, PCM data I push using alBufferData() and then alSourceQueueBuffers() is never processed by OpenAL until I move or resize my window (from Irrlicht's device) or I break into my code (in VC9). I think it has something to do with IO or either the message loop because the window appears to enter a state that allows OpenAL to process content pushed in its buffers. As soon as I come back to normal execution of the window, sound in buffer loops on really short samples (which is basically very annoying).
Any idea what could be wrong?
----
Solution: in the end it appears my window callbacks were forcing a play of the current buffer pushed in OpenAL that went starved because of a wrong buffer management (that explains why sometimes, when moving, resizing the window or breaking into the code I could hear short samples of the sound I wanted to be played). Looking at OpenAL samples helped me fix the issue (especially the streaming one).