diff options
author | Chris Robinson <[email protected]> | 2008-01-19 19:38:06 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-19 19:38:06 -0800 |
commit | bc963463f3f089a53375e3783c48340a50f65d09 (patch) | |
tree | 97d82bc1e0e4d2aa5691ba74022199c419a13789 | |
parent | 86b7b3d54b7b753148612919a17610058841ed64 (diff) |
Add an option for setting the max number of sources
-rw-r--r-- | Alc/ALc.c | 4 | ||||
-rw-r--r-- | alsoftrc.sample | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -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. |