
This is the XAudio2 sound sample from the DirectXSDK. It is the same engine that ArmA2 uses. This sample has been slightly modified so that it didn't crash. (Removed the reverb portion of it, so the reverb dropdown will not do anything)

This is already compiled, just run the shortcut. If you have VS2005 and want to recompile it, you'll have to install the dxdsk and set up the paths as noted here: http://msdn.microsoft.com/en-us/library/dd229887%28VS.85%29.aspx

Original Post
http://forums.bistudio.com/showthread.php?p=1399212#post1399212
---
I had this too, Distorted sounds, coming out of the wrong speakers. (example put a M1 infront of you, tread noises come out back speakers, engine bass out fronts no matter where you are looking, clicking, tearing, horrible LOUD sounds)

I fixed it by setting, under Playback, my SPEAKERS as a default communication device. If the default communication devices is set to my headset(which is the logical choice), it goes apeshit. I tested every option I could think of, and that communications (telephone icon) setting is the only one that causes it to go crazy. (bitrate, exclusive priority, effects, all work fine)

I believe the equivalent to this setting in XP, is the VOICE tab under Sounds and Audio Devices.

This may be a game bug, or the xAudio2 libs are broke in some way that concerns that setting. I will download the DirectX SDK and see if the positional xAudio samples work fine, if so then its a BIS BUG. (see edit, it is)

Windows7 final (msdn)
Realtek HDAudio driver ver 6.0.1.5898
7.1 surround via analog cables to Yamaha RX-V663

Profile:
// doesn't matter if they are set to 1 or 0, that I can tell. They are probably ignored since there is no need to support hardware limited EAX nor is there hardware acceleration in xAudio2. Someone correct me if these settings actually have an effect. (on different OS's perhaps?)
soundEnableEAX=0;
soundEnableHW=0;

Note: If you have a creative labs card, DO NOT USE CMSS. This is not surround sound in any way, its taking front speakers and copying them to the rest. You want pure 4.1, 5.1, or 7.1, unadultarated surround sound without Creative gimmics enabled.

---------------------------------------------------------
Edit:
After testing with XAudio2Sound3D sample (I had to edit some things in it to remove the reverb SourceVoice code because it crashed) it seems clear that the problem is not in XAudio2. It appears by mistake BIS is pulling some properties of the default VOICE/Communications device and trying to render the main audio device with those caps. This could be number of channels, bitrate, etc. In other words, it is probably trying to open up the default sound device with the default communication device's capabilities. This is not a hardware problem, nor an OS problem, it's a ArmA2 problem.