for(i=0;i<5/;++i)
{
add_sound_object( i,0,0);
//Sleep(100);
}
[OpenAL]You can't start multiple sources at the same time?!
When you say it works when Sleep() is called, does that mean the errors go away or the sound plays or both? I have not had any problems loading and playing multiple buffers.
Could you post some minimal source that replicates your problem? It would also be helpful to see what's in your add_sound_object() function.
What are the size and count of your buffers and how many sources play at once? I don't know what your computer specs are but if it is really slow((less)400Mhz) that may be a problem.
It's very strange that alGenBuffer() would generate an INVALID_NAME error. Make sure you log the value of alGetError() after every OpenAL call.
Oh, and from your other OpenAL thread, playing 7-8 source at once shouldn't be a problem for a reasonable computer.
Could you post some minimal source that replicates your problem? It would also be helpful to see what's in your add_sound_object() function.
What are the size and count of your buffers and how many sources play at once? I don't know what your computer specs are but if it is really slow((less)400Mhz) that may be a problem.
It's very strange that alGenBuffer() would generate an INVALID_NAME error. Make sure you log the value of alGetError() after every OpenAL call.
Oh, and from your other OpenAL thread, playing 7-8 source at once shouldn't be a problem for a reasonable computer.
The source is quite complex...
I'm playing maybe 5 sources at the same instant, each being queued with 2/3 buffers. With Sleep() enabled, there are no errors and the sounds play. Without it, some of the sources get errors (not all).
The PC is 750MHz.
Do I need to use a Mutex/Ctitical Section with AL if my app is single-threaded - the original source did this but it seems un-needed.
I'm playing maybe 5 sources at the same instant, each being queued with 2/3 buffers. With Sleep() enabled, there are no errors and the sounds play. Without it, some of the sources get errors (not all).
The PC is 750MHz.
Do I need to use a Mutex/Ctitical Section with AL if my app is single-threaded - the original source did this but it seems un-needed.
I don't think you need any of those things. You must be working with some pretty wierd platform/source:) I'll share my audio code. It streams .oggs and play wave files. Maybe it'll help somehow.
openal_audio.zip
Good Luck
openal_audio.zip
Good Luck
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement