Jump to content
  • Advertisement
Sign in to follow this  

Targetting Win7 with XAUDIO2

This topic is 1447 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wanted to give XAUDIO2 a shot and after compilation I got missing xaudio2_8.dll errors on my windows 7 system.

I use VS 2012 Express and the win8 SDK, as recommended by MS for DirectX 11 development.

After a few Google searches and articles read it seems that this is normal as it's a Windows 8 dll not found on a 7 system.

Apparently, the solution to target "down" is to include the xaudio.h header file from the June 2010 SDK. Now, I don't want to undo all my efforts to forget about this SDK and legacy D3DX cruft and add the June 2010 SDK again to my VC++ include directories because then it will again include the wrong stuff for everything else and I will again get macro redifinition warnings which I believe are only the top of an iceberg of other hidden problems. I googled further and found this solution:

#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
#include <xaudio2.h>
#pragma comment(lib,"xaudio2.lib")
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\comdecl.h>
#include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2.h>
However, it still claims comdecl.h and a myriad of others can't be found, and the file where this happens is xaudio2.h, which I assume includes comdecl the relative way. I hope there is a better solution than to modify xaudio2.h ?
It seems that I'm not the only one struggling with this:

Share this post

Link to post
Share on other sites

I don't know how deep you want to get into xaudio2, but you may want to look into the DirectX Toolkit. In particular, look at Audio.h in that package and see if the wrapper serves your needs. It uses DX SDK libraries but you can load them by full path without adding the DXSDK to your include/library directories -


#pragma comment(lib,"c:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\lib\\x86\\x3daudio.lib")
#pragma comment(lib,"c:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\lib\\x86\\xapofx.lib")

That approach, of course, adds the DXTK libraries to your dependencies, but may get you started. The DXTK may also provide you with an implementation approach you can work with.

Edited by Buckeye

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!