Ignore:
Timestamp:
Sep 26, 2013, 1:18:31 AM (10 years ago)
Author:
Sam Hocevar
Message:

audio: only activate the "song" class if SDL_mixer is present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/branches/lol/src/sdlport/sound.h

    r555 r722  
    1212#define __SOUND_H__
    1313
    14 #if !defined __CELLOS_LV2__
    15 #   include <SDL/SDL_mixer.h>
     14#if defined USE_SDL_MIXER
     15#   if defined HAVE_SDL_SDL_H
     16#      include <SDL/SDL.h>
     17#   else
     18#      include <SDL.h>
     19#   endif
     20#   if defined HAVE_SDL_SDL_MIXER_H
     21#      include <SDL/SDL_mixer.h>
     22#   else
     23#      include <SDL_mixer.h>
     24#   endif
    1625#endif
    1726
     
    3443
    3544private:
    36 #if !defined __CELLOS_LV2__
     45#if defined USE_SDL_MIXER
    3746    Mix_Chunk* m_chunk;
    3847#endif
     
    4251{
    4352public:
    44 #if !defined __CELLOS_LV2__
    45     char const *name() { return Name; }
    46 #endif
    47     song(char const *filename);
     53    String const &name() { return m_name; }
     54    song(String const &filename);
    4855    void play(unsigned char volume=127);
    4956    void stop(long fadeout_time=0); // time in ms
     
    5360
    5461private:
    55 #if !defined __CELLOS_LV2__
    56     char *Name;
    57     unsigned char *data;
     62    String m_name;
     63#if defined USE_SDL_MIXER
     64    uint8_t *data;
    5865    unsigned long song_id;
    5966    Mix_Music* music;
Note: See TracChangeset for help on using the changeset viewer.