• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
mrheisenberg

What do you use for Audio in DirectX applications?

14 posts in this topic

This concerns mainly a problem I found with the new windows SDK that includes DirectX headers.Even with this + Visual Studio 2012,it still gives me the ''The program can't start because XAudio2_8.dll is missing from your computer.Try reinstalling the program to fix the problem.'' error.Would it be better to just use DirectSound instead of XAudio2?Is XAudio2 really worth the trouble?
0

Share this post


Link to post
Share on other sites
[quote name='bschmidt1962' timestamp='1347056645' post='4977836']
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 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img].

There are of course other 3rd party audio API's out there such as FMOD, WWise, Miles, etc, that may be worth looking at.

Brian Schmidt
Final 3 weeks for Earlybird Discount
[url="http://www.gamesoundcon.com"]GameSoundCon[/url] 2012, San Francisco.
Oct 24-25
[/quote]

XAudio2 is perfect,however it just doesn't run,it wants some XAudio2_8.dll.I don't understant WHY it wants the DLL,when it's obviously a Windows 8 dll that hasn't even come out yet,why does my code in Windows7 in a normal DirectX11 application require me to have a DLL that is in Windows 8,how do I get that DLL?No one seems to have info on the issue of missing XAudio2_8.dll.I can't even call it missing,since it's not even supposed to be there,Windows 7 has XAudio2_7.dll.Why my program requires a dll that it shouldn't even know about is beyond me. [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]
0

Share this post


Link to post
Share on other sites
It requires you to have that DLL because you're linking against it. Unless MS decides to package it up in a redistributable or install it via service pack, I don't think you can use it on Windows 7.
0

Share this post


Link to post
Share on other sites
I'm only including this:

#include <xaudio2.h>
#include <x3daudio.h>
#include <xaudio2fx.h>

[CODE]#pragma comment (lib, "xaudio2.lib")
#pragma comment (lib, "x3daudio.lib")[/CODE]

It worked fine before with just

[CODE]#include <xaudio2.h>
#pragma comment (lib, "xaudio2.lib")[/CODE]

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
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='kunos' timestamp='1347086914' post='4977916']
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.
[/quote]

Ok I found something weird:In the DirectX 2010 SDK(atleast in mine,which I reainstalled 3 times) there is no XAudio2.lib and in the sample XAudio2 projects from the SDK,no XAudio2.lib is linked.However,there is XAudio2.lib in the new Windows 8 SDK,so I figured I should just not be linking it.But when I unlink it,it gives me
[quote]Unhandled exception at 0x5019DEF0 (msvcr110d.dll) in Engine.exe: 0xC0000005: Access violation writing location 0x0F7B0460.[/quote]
0

Share this post


Link to post
Share on other sites
You can use something like this:
[CODE]
#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
#endif
[/CODE]
for more information read [url="http://blogs.msdn.com/b/chuckw/archive/2012/04/02/xaudio2-and-windows-8-consumer-preview.aspx"]this[/url]. Edited by nader
2

Share this post


Link to post
Share on other sites
[quote name='mrheisenberg' timestamp='1347065388' post='4977867']
I'm only including this:

#include <xaudio2.h>
#include <x3daudio.h>
#include <xaudio2fx.h>

[CODE]#pragma comment (lib, "xaudio2.lib")
#pragma comment (lib, "x3daudio.lib")[/CODE]

It worked fine before with just

[CODE]#include <xaudio2.h>
#pragma comment (lib, "xaudio2.lib")[/CODE]

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
[/quote]

Those libraries you're linking to are [url="http://en.wikipedia.org/wiki/Dynamic-link_library#Import_libraries"]import libraries[/url]. Basically they're just stubs that allow to linker to hook up your code's function calls to the functions exported by the DLL, instead of having to manually ask for the address of the DLL function at runtime. When you link to a DLL's import lib your app now has a dependency on that DLL, which means it will attempt to load that DLL when the app starts up. If it can't find the right DLL, you get that error.
2

Share this post


Link to post
Share on other sites
[quote name='nader' timestamp='1347129826' post='4978060']
You can use something like this:
[CODE]
#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
#endif
[/CODE]
for more information read [url="http://blogs.msdn.com/b/chuckw/archive/2012/04/02/xaudio2-and-windows-8-consumer-preview.aspx"]this[/url].
[/quote]

I did all this and this time it actualy loads XAudio2_7.dll properly(I see it quickly in the orange bar at the bottom after build time),but it gives me a[b] Unhandled exception at 0x52FEDEF0 (msvcr110d.dll) in Engine.exe: 0xC0000005: Access violation writing location 0x0F7E0460.[/b] with no source code avaliable.Is there anything else special that I must install/import?
0

Share this post


Link to post
Share on other sites
It would be not enough. DXAudio 2.7 API is a bit different. You should develop separate codes for both and link your executable against different libraries, depending on a destination host.
(or you could create one complex audio support)
Please consider using only 2.7 API and deploying it with your application. Two separate libraries and their API headers should be used separetely.

Helpful things:[list]
[*]Delay Load DLLs
[*]LoadLibrary, etc.
[/list]
0

Share this post


Link to post
Share on other sites
[quote name='kubera' timestamp='1347467963' post='4979355']
Please consider using only 2.7 API and deploying it with your application.
[/quote]

well that's just the thing o_O I want to use only 2.7,the only problem was that it required the 2.8dll even when I directly copied the code from the 2010 SDK(and in visual studio 2010). Edited by mrheisenberg
0

Share this post


Link to post
Share on other sites
Hey did you manage to solve it? I've got the exact same problem, xaudio2.lib just isn't in there ( june 2010 directx sdk )
0

Share this post


Link to post
Share on other sites
I answered a same question from stack overflow. just for your reference

The basic rule is, if you develop XAudio2 program on Win 8, use the Windows SDK, otherwise, use DirectX SDK.
If you are working on Win7, make sure[list]
[*]the head file XAudio2.h you are using comes from the DirectX SDK, that's something like C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\XAudio2.h, not come from the Win8 SDK, something like C:\Program Files\Windows Kits\8.0\Include\um\XAudio2.h(in case you installed the Win8 SDK)
[*]Call CoInitializeEx(NULL, COINIT_MULTITHREADED); before calling XAudio2Create, since the old version(before 2.8) of XAaudio2 was created by COM, so it does not need a .lib file, and there is no .lib file for XAudio2 before Win8.
[/list]
This page below contains a detail introduction of the version of XAudio2, you can take a look.
[url="http://msdn.microsoft.com/en-us/library/windows/desktop/ee415802(v=vs.85).aspx"]XAudio2 Versions[/url] Edited by zdd
0

Share this post


Link to post
Share on other sites
Such informations often has been answered in that blog already:
[url="http://blogs.msdn.com/b/chuckw/"]http://blogs.msdn.com/b/chuckw/[/url]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0