Jump to content
Posted 07 September 2012 - 11:07 AM
Posted 07 September 2012 - 04:24 PM
Executive Director, GameSoundCon:
GameSoundCon 2016:September 27-28, Los Angeles, CA
Founder, Brian Schmidt Studios, LLC
Music Composition & Sound Design
Audio Technology Consultant
Posted 07 September 2012 - 05:29 PM
That probably depends on your audio needs.
XAudio 2 was designed to address some of the limitations of the original DirectSound API, which was designed back in the mid 1990's when ISA soundcards with on-board audio RAM were all the rage and a cutting edge PC was a 66MHz Pentium I. XAudio 2 was designed with a software implementation in mind.
If all you need to do is play back a few sound effects, and you know DirectSound, then it'll probably work just fine.
XAudio 2 does support several useful features that DSound doesn't, though.
Native run-time decompression (ADPCM and wma), digital signal processing (for reverbs, filtering or arbitrary audio processing), submixing, audio graphbuilding and a more transparent 3D implementation. If you think you may want to use those at some point, it's probably worth learning and using XAudio 2. (the compressed sound support alone may be worth the switch).
Big Disclaimer-- I was the primary architect for XAudio 2 back when I was at Microsoft, so may be biased .
There are of course other 3rd party audio API's out there such as FMOD, WWise, Miles, etc, that may be worth looking at.
Final 3 weeks for Earlybird Discount
GameSoundCon 2012, San Francisco.
Posted 07 September 2012 - 06:49 PM
#pragma comment (lib, "xaudio2.lib") #pragma comment (lib, "x3daudio.lib")
#include <xaudio2.h> #pragma comment (lib, "xaudio2.lib")
Posted 08 September 2012 - 12:48 AM
Posted 08 September 2012 - 07:44 AM
to use the old (v7) version of XAudio2 you should install the DirectX 2010 SDK and make sure your project is pointing at it for headers and lib files. I haven't moved to VS 2012 yet (waiting for the official release next week) but reading around this seems to be the way to go to support Win7.
Unhandled exception at 0x5019DEF0 (msvcr110d.dll) in Engine.exe: 0xC0000005: Access violation writing location 0x0F7B0460.
Posted 08 September 2012 - 12:43 PM
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/) #include <xaudio2.h> // from Windows 8.0 SDK #pragma comment(lib,"xaudio2.lib") #else #include <c:\dxsdk\include\xaudio2.h> // from DirectX SDK #endiffor more information read this.
Edited by nader, 08 September 2012 - 12:46 PM.
Posted 08 September 2012 - 02:25 PM
I'm only including this:
#include <xaudio2fx.h>#pragma comment (lib, "xaudio2.lib") #pragma comment (lib, "x3daudio.lib")
It worked fine before with just#include <xaudio2.h> #pragma comment (lib, "xaudio2.lib")
However I don't understand why implementing 3D audio causes the problem.I mean the same headers and libraries are included in the SDK 3D Audio sample and I can run it fine,however when I use these functions in my project,the missing DLL thing comes up.Now I've checked project options carefuly at both my project and the SDK sample one,all the settings are the same,I checked all their code,there is no reference in the source for such a dll,so perhaps it's called for in the libs?But how can that be if those libs were made over 2 years ago while this dll that it wants is from Windows 8
Posted 11 September 2012 - 05:00 PM
You can use something like this:#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/) #include <xaudio2.h> // from Windows 8.0 SDK #pragma comment(lib,"xaudio2.lib") #else #include <c:\dxsdk\include\xaudio2.h> // from DirectX SDK #endiffor more information read this.
Posted 12 September 2012 - 10:39 AM
Posted 14 September 2012 - 06:39 PM
Please consider using only 2.7 API and deploying it with your application.
Edited by mrheisenberg, 14 September 2012 - 10:27 PM.
Posted 18 September 2012 - 04:34 AM
Posted 14 October 2012 - 04:25 AM
Edited by zdd, 14 October 2012 - 04:26 AM.