diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 5122b3a5a..97a399689 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -426,6 +426,12 @@ void OpenAL_Output::init(const std::string &devname) else std::cout << "Opened \""< attrs(size); +// alcGetIntegerv( mDevice, ALC_ALL_ATTRIBUTES, size, &attrs[0] ); +// for(int i=0; i(maxmono+maxstereo, 256); - for(size_t i = 0;i < maxtotal;i++) + ALCuint maxtotal = 256;//std::min(maxmono+maxstereo, 256); + bool stop = false; + for(size_t i = 0;i < maxtotal && !stop;i++) { ALuint src = 0; alGenSources(1, &src); - throwALerror(); - mFreeSources.push_back(src); + + ALenum err = alGetError(); + if(err != AL_NO_ERROR) + { + stop = true; + std::cout << "Stopping source generation at " << i << std::endl; + } + else + { + mFreeSources.push_back(src); + } + //throwALerror(); } } catch(std::exception &e)