Jump to content

  • Log In with Google      Sign In   
  • Create Account

Targetting Win7 with XAUDIO2


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Fredericvo   Members   -  Reputation: 487

Like
0Likes
Like

Posted 04 September 2014 - 12:01 PM

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")
#else
#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>
#endif
 
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:
 
 
 
 
 


Sponsor:

#2 kubera   Members   -  Reputation: 973

Like
0Likes
Like

Posted 29 September 2014 - 04:06 PM

Please read this blog:

http://blogs.msdn.com/b/chuckw/archive/2012/04/02/xaudio2-and-windows-8-consumer-preview.aspx



#3 Buckeye   Crossbones+   -  Reputation: 6407

Like
0Likes
Like

Posted 07 October 2014 - 09:14 AM

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, 07 October 2014 - 09:17 AM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS