Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
5df7568e
Commit
5df7568e
authored
Aug 22, 2011
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further XAudio2 build test cleanups.
parent
6412a314
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
SDL_xaudio2.c
src/audio/xaudio2/SDL_xaudio2.c
+12
-8
No files found.
src/audio/xaudio2/SDL_xaudio2.c
View file @
5df7568e
...
@@ -22,18 +22,19 @@
...
@@ -22,18 +22,19 @@
#include "../../core/windows/SDL_windows.h"
#include "../../core/windows/SDL_windows.h"
#include "SDL_audio.h"
#include "SDL_audio.h"
#include "../SDL_audio_c.h"
#include "../SDL_audio_c.h"
#include "SDL_assert.h"
#include "../SDL_sysaudio.h"
#include "../SDL_sysaudio.h"
#include "SDL_assert.h"
#if SDL_AUDIO_DRIVER_XAUDIO2
#if SDL_AUDIO_DRIVER_XAUDIO2
#include <dxsdkver.h>
/* XAudio2 exists as of the March 2008 DirectX SDK */
#include <dxsdkver.h>
/* XAudio2 exists as of the March 2008 DirectX SDK */
#if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284))
#if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284))
# define SDL_HAVE_XAUDIO2_H 1
# warning Your DirectX SDK is too old. Disabling XAudio2 support.
#endif
#else
# define SDL_XAUDIO2_HAS_SDK 1
#endif
#endif
#ifdef SDL_
HAVE_XAUDIO2_H
#ifdef SDL_
XAUDIO2_HAS_SDK
#define INITGUID 1
#define INITGUID 1
#include <XAudio2.h>
#include <XAudio2.h>
...
@@ -396,13 +397,14 @@ XAUDIO2_Deinitialize(void)
...
@@ -396,13 +397,14 @@ XAUDIO2_Deinitialize(void)
WIN_CoUninitialize
();
WIN_CoUninitialize
();
}
}
#endif
/* SDL_
HAVE_XAUDIO2_H
*/
#endif
/* SDL_
XAUDIO2_HAS_SDK
*/
static
int
static
int
XAUDIO2_Init
(
SDL_AudioDriverImpl
*
impl
)
XAUDIO2_Init
(
SDL_AudioDriverImpl
*
impl
)
{
{
#if !SDL_HAVE_XAUDIO2_H
#ifndef SDL_XAUDIO2_HAS_SDK
SDL_SetError
(
"XAudio2: SDL was built without XAudio2 support (old DirectX SDK)."
);
return
0
;
/* no XAudio2 support, ever. Update your SDK! */
return
0
;
/* no XAudio2 support, ever. Update your SDK! */
#else
#else
/* XAudio2Create() is a macro that uses COM; we don't load the .dll */
/* XAudio2Create() is a macro that uses COM; we don't load the .dll */
...
@@ -437,4 +439,6 @@ AudioBootStrap XAUDIO2_bootstrap = {
...
@@ -437,4 +439,6 @@ AudioBootStrap XAUDIO2_bootstrap = {
"xaudio2"
,
"XAudio2"
,
XAUDIO2_Init
,
0
"xaudio2"
,
"XAudio2"
,
XAUDIO2_Init
,
0
};
};
#endif
/* SDL_AUDIO_DRIVER_XAUDIO2 */
/* vi: set ts=4 sw=4 expandtab: */
/* vi: set ts=4 sw=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment