xaudio2 improvements

According to http://msdn.microsoft.com/en-us/library/windows/desktop/ee415745%28v=vs.85%29.aspx, callback functions must not synchronize with other parts of client code. I never experienced any problems myself but better be safe than sorry. Also fixed code formatting.