Do not include SDL_mixer.h from headers

In case the header is included but not used by a program compiled without
sound support.
Günther Brammer 2011-01-24 01:17:06 +01:00
parent 58d3682678
commit 7771a58f38
3 changed files with 9 additions and 3 deletions

View File

@ -217,6 +217,9 @@ VorbisLoader VorbisLoader::singleton;
#endif
#ifdef HAVE_LIBSDL_MIXER
#define USE_RWOPS
#include <SDL_mixer.h>
bool SDLMixerSoundLoader::ReadInfo(SoundInfo* result, BYTE* data, size_t data_length, uint32_t)
{
// Be paranoid about SDL_Mixer initialisation

View File

@ -35,6 +35,11 @@
#include <C4Viewport.h>
#include <C4SoundLoaders.h>
#ifdef HAVE_LIBSDL_MIXER
#define USE_RWOPS
#include <SDL_mixer.h>
#endif
using namespace C4SoundLoaders;
C4SoundEffect::C4SoundEffect():

View File

@ -40,9 +40,7 @@ class C4SoundInstance;
#include <fmod.h>
typedef FSOUND_SAMPLE* C4SoundHandle;
#elif defined(HAVE_LIBSDL_MIXER)
#define USE_RWOPS
#include <SDL_mixer.h>
typedef Mix_Chunk* C4SoundHandle;
typedef struct Mix_Chunk* C4SoundHandle;
#elif defined(USE_OPEN_AL)
#ifdef __APPLE__
#import <OpenAL/al.h>