Ignore:
Timestamp:
Apr 22, 2011, 7:32:17 PM (12 years ago)
Author:
Sam Hocevar
Message:

imlib: remove a lot of dead code, especially from the linked list and
the WAV reader.

Location:
abuse/trunk/src/sdlport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/sdlport/sound.cpp

    r494 r534  
    218218    if( sound_enabled )
    219219    {
    220         long sample_speed;
     220        int sample_speed;
    221221
    222222#ifdef USE_SDL_MIXER
  • abuse/trunk/src/sdlport/sound.h

    r494 r534  
    99 */
    1010
    11 #ifndef __SOUND_HPP_
    12 #define __SOUND_HPP_
     11#ifndef __SOUND_H__
     12#define __SOUND_H__
    1313
    1414#ifdef USE_SDL_MIXER
    15 #include <SDL/SDL_mixer.h>
     15#   include <SDL/SDL_mixer.h>
    1616#endif
    1717
     
    2323int sound_init(int argc, char **argv);
    2424void sound_uninit();
    25 void print_sound_options();                         // print the options avaible for sound
     25void print_sound_options(); // print the options avaible for sound
    2626
    2727class sound_effect
    2828{
    29   long size;
    30   void *data;
     29public:
     30    sound_effect(char *filename);
     31    void play(int volume = 127, int pitch = 128, int panpot = 128);
     32    ~sound_effect();
     33
     34private:
     35    void *data;
    3136#ifdef USE_SDL_MIXER
    32   Mix_Chunk* chunk;
     37    Mix_Chunk* chunk;
    3338#endif
    34 public :
    35   sound_effect(char *filename);
    36   void play(int volume=127, int pitch=128, int panpot=128);
    37   ~sound_effect();
    38 } ;
    39 
     39    int size;
     40};
    4041
    4142class song
    4243{
    43   char *Name;
    44   unsigned char *data;
    45   unsigned long song_id;
     44public:
     45    char const *name() { return Name; }
     46    song(char const *filename);
     47    void play(unsigned char volume=127);
     48    void stop(long fadeout_time=0); // time in ms
     49    int playing();
     50    void set_volume(int volume);
     51    ~song();
     52
     53private:
     54    char *Name;
     55    unsigned char *data;
     56    unsigned long song_id;
    4657#ifdef USE_SDL_MIXER
    47   Mix_Music* music;
    48   SDL_RWops* rw;
     58    Mix_Music* music;
     59    SDL_RWops* rw;
    4960#endif
    50 public :
    51   char const *name() { return Name; }
    52   song(char const *filename);
    53   void play(unsigned char volume=127);
    54   void stop(long fadeout_time=0);                                        // time in ms
    55   int playing();
    56   void set_volume(int volume);
    57   ~song();
    58 } ;
     61};
     62
    5963#endif
    6064
    61 
    62 
    63 
    64 
    65 
    66 
    67 
    68 
    69 
    70 
Note: See TracChangeset for help on using the changeset viewer.