Add an option for setting the max number of sources

This commit is contained in:
Chris Robinson
2008-01-19 19:38:06 -08:00
parent 86b7b3d54b
commit bc963463f3
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -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++)
+4
View File
@@ -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.