First test build of new sound code. There are several known problems, but as there is more to something like this than just the code, early test builds are needed to work out the finer details quickly. This code is intended for post-3.6.12, so there is plenty of time to test things out and get it all working before the code hits SVN. These test builds will be kept in sync with the 3.6.12 RC process so as not to force the use of one build over the other, however just remember that any sound related bugs are NOT to be filed in Mantis when using these test builds.
Windows builds here (debug SSE, release SSE2):
http://icculus.org/~taylor/fso/testing/20100422-win32.7zMac builds
Inferno and
Standard based on Antipodes 5941 with patch from 2010-02-23 (chief1983)
Patch: http://icculus.org/~taylor/fso/misc/new_sound.7z
(NOTE: This is a git diff, not a svn diff. TortiseSVN will not accept it as a valid patch, but Linux and OS X patch utilities should handle it just fine. Apply with "patch -p1 < new_sound.diff".)Changes from 20100216 build:
- Sync with RC1
- fix buffer leak
- fix reverse doppler (maybe)
- fix looping for streaming audio
- fix fade/cutoff for steaming audio (should fix the gap between music tracks)
- voice capture disabled in code
- various minor fixes and improvements
Few notes about the changes in this build:
- All of the DirectSound code has been removed. The code is now 100% OpenAL
- 3D sound is fully implemented, but maybe not fully working. It's difficult to test such things using only headphones.

- Code should be slightly more efficient and with a few less (and new) bugs
- Capture support is implemented (for multi voice), however you are advised to not test it just yet
- New initialization setup should reduce problems with using faulty OpenAL devices
- EFX support (ie. EAX 2.0). See notes below.
Also, the following Mantis bugs should/may be fixed:
1854: Effects volume is muted at the second dot, instead of the first one
1632: ambient music doesn't return after fighters warp out
1769: play-sound-from-file: sound file is re-played after Alt-TAB
1047: Game cannot play more than one beam charge sound at once
0058: Flyby sound interupted
Notes regarding specific feature changes:
EFX: EFX is supported, but only in the basic sense. There is still a question over exactly how retail actually made use of EAX effects in the first place. The thinking is that some of that code was ripped out of the original source release, but the code that does exist as well as various comments in the code indicate that this may not be true. So if nothing was ripped out, then what is currently implemented is just like in retail. If anyone has any further info on whether or not this code actually functions the same please let me know.
Because EFX in software can be rather CPU intensive, it is disabled by default. To enable it in Windows, create a new key under "Volition\FreeSpace\" named "Sound", under which create DWORD value "EnableEFX" set to 1. For Linux/OSX, edit your fs2_open.ini file and add a "[Sound]" section, with "EnableEFX=1" in it. If this makes the game too choppy then you can try lowering the sample rate to improve performance by putting "SampleRate=22050" in the "Sound" key/section.
New device detection: The device specified in the Launcher is no longer used. The code will now try all available devices and simply use the first one that works (supports enough sound sources for the game). You can set a preferred device with "PlaybackDevice=<device_name>" in the "Sound" key/section mentioned previously. During init it will try the preferred device, the default device, and everything else, in that order. So there is no guarantee that your preferred playback device will be the one chosen by the game. The debug log will show exactly which device is in use however, and a value of "+OpenAL" in the debug_filter.cfg file will additionally list all available devices that the game is checking.
3D sound: This has only been tested with headphones to this point, so testing it on a good 7.1 surround sound setup would be nice. Any audiophiles are also encouraged to test and give feedback on how this sounds. The settings could be off and need tweaking, since while I know the technical aspects of the code, I don't know the technical aspects of sound mechanics.
Voice capture: The capture code is implemented and working, however the voice capabilities have been disabled for the foreseeable future. Although the new capture code itself is working fine, the rest of the retail code which handles voice is a horrible mess of bugs, memory errors, and wild assumptions about how any function will work. Fixing this will require ripping out and rewriting various parts of the retail code. As such this feature has been disabled in the code until that work has been done. There is currently no time frame for this to be done however.