Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling SDL_fsaudio.c against fusionsound 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Couriersud committed Aug 3, 2009
1 parent 5d2c09e commit 4b7bd6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/audio/fusionsound/SDL_fsaudio.c
Expand Up @@ -34,6 +34,8 @@
#include "../SDL_audio_c.h" #include "../SDL_audio_c.h"
#include "SDL_fsaudio.h" #include "SDL_fsaudio.h"


#include <fusionsound/fusionsound_version.h>

//#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so" //#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so"


#ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC #ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
Expand All @@ -43,6 +45,10 @@
#define SDL_NAME(X) X #define SDL_NAME(X) X
#endif #endif


#if (FUSIONSOUND_MAJOR_VERSION == 1) && (FUSIONSOUND_MINOR_VERSION < 1)
typedef DFBResult DirectResult;
#endif

/* The tag name used by fusionsoundc audio */ /* The tag name used by fusionsoundc audio */
#define SDL_FS_DRIVER_NAME "fusionsound" #define SDL_FS_DRIVER_NAME "fusionsound"
/* Buffers to use - more than 2 gives a lot of latency */ /* Buffers to use - more than 2 gives a lot of latency */
Expand All @@ -53,8 +59,8 @@
static const char *fs_library = SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC; static const char *fs_library = SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC;
static void *fs_handle = NULL; static void *fs_handle = NULL;


static DirectResult(*SDL_NAME(FusionSoundInit)) (int *argc, char *(*argv[])); static DirectResult (*SDL_NAME(FusionSoundInit)) (int *argc, char *(*argv[]));
static DirectResult(*SDL_NAME(FusionSoundCreate)) (IFusionSound ** static DirectResult (*SDL_NAME(FusionSoundCreate)) (IFusionSound **
ret_interface); ret_interface);


#define SDL_FS_SYM(x) { #x, (void **) (char *) &SDL_NAME(x) } #define SDL_FS_SYM(x) { #x, (void **) (char *) &SDL_NAME(x) }
Expand Down

0 comments on commit 4b7bd6a

Please sign in to comment.