Add an option for setting the max number of sources
This commit is contained in:
@@ -1156,7 +1156,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName)
|
||||
if((ALint)device->UpdateFreq <= 0)
|
||||
device->UpdateFreq = 8192;
|
||||
|
||||
device->MaxNoOfSources = 256;
|
||||
device->MaxNoOfSources = GetConfigValueInt(NULL, "sources", 256);
|
||||
if((ALint)device->MaxNoOfSources <= 0)
|
||||
device->MaxNoOfSources = 256;
|
||||
|
||||
// Find a playback device to open
|
||||
for(i = 0;BackendList[i].Init;i++)
|
||||
|
||||
@@ -40,6 +40,10 @@ frequency = 44100 # Sets the output frequency. Default is 44100
|
||||
refresh = 8192 # Sets the buffer size, in frames. Default is 8192. Note that
|
||||
# the actual granularity may or may not be less than this.
|
||||
|
||||
sources = 256 # Sets the maximum number of allocatable sources. Lower values
|
||||
# may help for systems with apps that try to play more sounds
|
||||
# than the CPU can handle. Default is 256
|
||||
|
||||
drivers = # Sets the backend driver list order, comma-seperated. Unknown
|
||||
# backends and duplicated names are ignored, and unlisted backends
|
||||
# won't be considered for use. An empty list means the default.
|
||||
|
||||
Reference in New Issue
Block a user