Which API should I use for playing audio on Windows?
QSound, then it will fit right in with the rest of your Qt application, and it will work not only on Windows but also on Mac OS X and Linux, as well. It is not uncommon to find a core, platform-specific API that isn't very friendly to developers, and then a myriad of more developer friendly APIs built on top of the core. Using a core API may be negligibly faster, but using the layers on top of these core APIs is almost always more convenient and maintainable, and protects you from changes to the low-level core.
Edit
From the description of XAudio2:
XAudio2 is a low-level, cross-platform audio API for Microsoft Windows and Xbox 360. It provides a signal processing and mixing foundation for games that is similar to its predecessors, DirectSound and XAudio. For Windows game developers, XAudio2 is the long-awaited replacement for DirectSound.
So, it looks like that would be the API to use if you want a core, platform-specific audio library.
Edit 2
I was a little quick with my first answer... really, it depends on what you want to do. If all you want to do is play an audio file, then QSound is the way to go. If, however, you want to mix and generate audio on the fly, then using a more feature-capable library such as XAudio2 (which is a part of DirectX and is intended for creating sound as part of video games) would be the way to go.
Really depends on what you want to do. For most common scenarios, I've found that the MCIWnd functions work well: they're really easy to use and can play any format for which a codec is installed.
DirectSound is somewhat more difficult to use but gives you much more control over the output; it lets you add special effects and simulate 3D positioning.
The waveOut
functions are the lowest level API you can get to and they are a kind of double-edged sword: you get to control exactly what goes out to the speakers, but they accept only raw waveform data, which means you are responsible for all decoding and post-processing of input data. PlaySound
essentially provides a nice wrapper around this.