168149ce9d
The purpose of this is to provide a safe way to be able to "swap" resources used by the mixer from other threads without the need to block the mixer, as well as a way to track when mixes have occurred. The idea is two-fold: It provides a way to safely swap resources. If the mixer were to (atomically) get a reference to an object to access it from, another thread would be able allocate and prepare a new object then swap the reference to it with the stored one. The other thread would then be able to wait until (count&1) is clear, indicating the mixer is not running, before safely freeing the old object for the mixer to use the new one. It also provides a way to tell if the mixer has run. With this, a thread would be able to read multiple values, which could be altered by the mixer, without requiring a mixer lock. Comparing the before and after counts for inequality would signify if the mixer has (started to) run, indicating the values may be out of sync and should try getting them again. Of course, it will still need something like a RWLock to ensure another (non-mixer) thread doesn't try to write to the values at the same time. Note that because of the possibility of overflow, the counter is not reliable as an absolute count. |
||
---|---|---|
Alc | ||
build | ||
cmake | ||
examples | ||
hrtf | ||
include/AL | ||
OpenAL32 | ||
utils | ||
.gitignore | ||
alsoftrc.sample | ||
CMakeLists.txt | ||
config.h.in | ||
COPYING | ||
env-vars.txt | ||
hrtf.txt | ||
openal.pc.in | ||
README | ||
XCompile.txt |
Source Install ============== To install OpenAL Soft, use your favorite shell to go into the build/ directory, and run: cmake .. Assuming configuration went well, you can then build it, typically using GNU Make (KDevelop, MSVC, and others are possible depending on your system setup and CMake configuration). Please Note: Double check that the appropriate backends were detected. Often, complaints of no sound, crashing, and missing devices can be solved by making sure the correct backends are being used. CMake's output will identify which backends were enabled. For most systems, you will likely want to make sure ALSA, OSS, and PulseAudio were detected (if your target system uses them). For Windows, make sure DirectSound was detected. Utilities ========= The source package comes with an informational utility, openal-info, and is built by default. It prints out information provided by the ALC and AL sub- systems, including discovered devices, version information, and extensions. Configuration ============= OpenAL Soft can be configured on a per-user and per-system basis. This allows users and sysadmins to control information provided to applications, as well as application-agnostic behavior of the library. See alsoftrc.sample for available settings. Acknowledgements ================ Special thanks go to: Creative Labs for the original source code this is based off of. Christopher Fitzgerald for the current reverb effect implementation, and helping with the low-pass filter. Christian Borss for the 3D panning code the current implementation is heavilly based on. Ben Davis for the idea behind the current click-removal code.