OpenAL sources limit
My computer game uses OpenAL. I have recently encountered a problem: I can not generate as many sources as I want. It gives me this error:
I don't actually understand what they mean by "non-memory resources". What does the count of possible sources depend on? How can I detect the possible count of sources? Some computers seem to allow much more sources.
There are not enough non-memory resources to create all the requested sources, or the array pointer is not valid.
Normally you can count on at least 20 sources. Depending on the sound card you may actually get up to 32 or more. Check the OpenAL docs for more information.
Only 32? Do I understand something wrong? My computer is not the newest machine at all and I get at least 200.
At the moment I have used a separate source for every character in my game. There are sometimes quite many needed in the current case. Actually not as many as 200, but still... Should I search for a more effective way to do it?
200? Wow. I definitely do not get 200 sources on my Audigy 2. The only way to bypass the source issue is to mix your own data and place it all into one or more sources. You can do this by additive mixing your samples and then playing the final mixed result on a sound source. In order to get low level access to correctly mix the sounds you can consult the OAL docs or you can use the Windows multimedia API. I don't remember if OAL allows you to manually mix your samples.