wildicv/cAudio — Issue #12: OpenAL Error 40963 Invalid Value when creating 256 sounds
Author: northWind87
Created: 2012-02-27 22:28:25+00:00
State: open

Not sure if this was submitted or if this is even a cAudio bug but I'm having trouble creating a large number of audio sources.
I essentially have a loop that calls cAudioManager::create repeatedly and it always crashes on sound #256

I'm passing the same filename and a different name at each iteration. I'm passing in false for stream. Code:

```c++
IAudioSource* sources[512];
const char fn = "myFile.ogg";
for (int i = 0; i < 512; i++)
{
std::stringstream n;
n << "Sound " << i;
sources[i] = mgr->create(n.str().c_str(), fn, false);
}
```

I traced the execution and it seems to to be an openal error. Error code 40963. The error string is "Invalid Value". Seems like ```alGenSources``` in cAudioSource.cpp (line 51) is what is setting the error state as the ```state``` variable was true prior to the ```checkError()``` call that comes after the ```alGenSources``` call. Any ideas what's up?

I'm running on a develop build of cAudio from commit 86548b947753ec7601f89a5812c2bdb8f9dacdd9