aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c4
-rw-r--r--alsoftrc.sample4
2 files changed, 7 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0d6af1dc..83ff7ba4 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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++)
diff --git a/alsoftrc.sample b/alsoftrc.sample
index 78abb924..c3bb9e83 100644
--- a/alsoftrc.sample
+++ b/alsoftrc.sample
@@ -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.