| Summary: | XAudio2.h missing. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Christian Johansson <dalkon> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: | Attempt to work around problem. | ||
|
Description
Christian Johansson
2011-08-15 11:31:15 UTC
This is in the DirectX SDK. My understanding is that we need this SDK for other parts of SDL, too. --ryan. So it's just the audio parts that are not included in default SDKs. Created attachment 677 [details]
Attempt to work around problem.
It's likely that on older Visual Studios (or Platform SDKs? or maybe alternate compilers?), there are older DirectX SDK headers included, and you need to install an actual DirectX SDK to get the XAudio2 headers.
Any DirectX SDK from March 2008 and later should work. It's a free download from Microsoft.
I'm attaching an untested patch that checks for the SDK version, and doesn't compile the XAudio2 support if XAudio2.h would be missing. When I get back to a Windows box, I'll test it myself, but if you want to try it in the meantime, here it is.
--ryan.
dxsdkver.h is not included in default SDKs either. If you have a DirectX SDK downloaded the patch works just fine. I'm trying to find a workaround for the Visual Studio SDK right now so there's no need for 600MB of unused files. (In reply to comment #4) > dxsdkver.h is not included in default SDKs either. Ugh! We only need the header, not any libraries from the DirectX SDK (XAudio2 is accessed by asking the OS for a specific COM object)...so maybe we can just include XAudio2.h with SDL's sources, or something like that. Sam, you have any thoughts on the right way to fix this? The configure script can check this, but it obviously doesn't help for the Visual Studio projects. Christian: if you have an immediate need to fix this, so you can get on with your work, just change that dxsdkver.h test to be zero in my patch, and it'll remove the XAudio2 target from the build. --ryan. I've changed this in my sandbox repo to just need the SDL_AUDIO_DRIVER_XAUDIO2 line commented out in include/SDL_config_windows.h. This is about the best I can offer if we need to build without the DirectX SDK installed. (If building with the configure script, it'll handle this for you by testing for the XAudio2.h header, but for Visual Studio, you'll have to comment out the line in the header.) I'll resolve this bug when this moves from my sandbox repo to the main repository. --ryan. This is in the main repo now. --ryan. |