I'm making a game (shameless plug) that uses a custom game engine whose audio subsystem is built on top of XAudio2. For this game, I made a new explosion sound effect .wav file in Adobe Audition (a simple 44100 hz 32-bit float uncompressed wav), which I have attached to this post. I noticed that when playing the .wav file via my game, the sound effect is much lower quality than when playing it in Audition, lacking much of its original detail. So I did some more testing, trying it in a handful other programs. When that exact same .wav file is played in Unity3D or Google Chrome, it sounds great! (Though, interestingly, when played in Windows Media Player or VLC, it lacks detail much as it does when played via my game.) I have reproduced this on two different computers that have totally different sound hardware.
My first assumption was, of course, that I had screwed up something in my XAudio2 code. First, I double-checked to make sure that the sample rate of the .wav file matched that of my mastering voice, which it does (they're both 44100 hz), and then I played around with a variety of higher and lower sample rates, both for the .wav file and for the mastering voice. Unable to find any obvious issues in my own code but still figuring I screwed up somewhere, I then decided to sanity-check using Microsoft's XAudio2 sample code (specifically the "XAudio2BasicSound" example which does little more than load and play a few different sound effects) with my .wav file and, much to my surprise, the audio quality was just as poor as in my own game.
So now I'm wondering, is XAudio2 just bad, or is there anything I can do to improve its audio quality? (If someone knows how to improve the audio quality of Microsoft's sample code, then I can almost certainly make that same improvement in my own engine.) Or would I be better off using a different API?
Thanks for your help & advice!