Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 15, 2008, 10:54:25 AM (16 years ago)
Author:
rgrieder
Message:
  • removed obsolete Convert.h includes (possibly from old XML loading)
  • replaced tabs in audio library, plus minor code cleanup because removing the tabs screwed layout
  • replaced all "#define name number" with "const Type name = number" if possible
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/audio/AudioManager.h

    r1747 r1784  
    3737namespace audio
    3838{
    39   class _AudioExport AudioManager
    40         {
    41         public:
     39    class _AudioExport AudioManager
     40    {
     41    public:
     42        // Init audio
     43        AudioManager();
    4244
    43                 // Init audio
    44                 AudioManager();
     45        // Kill audio and set buffers, sources and memory free
     46        ~AudioManager();
    4547
    46                 // Kill audio and set buffers, sources and memory free
    47                 ~AudioManager();
     48        // Set listener position
     49        void setPos(std::vector<float> newPosition);
    4850
    49                 // Set listener position
    50                 void setPos(std::vector<float> newPosition);
     51        // Set listener speed
     52        void setSpeed(std::vector<float> newSpeed);
    5153
    52                 // Set listener speed
    53                 void setSpeed(std::vector<float> newSpeed);
     54        // Set listener orientation (first is direction
     55        // the listener looks at, the second is the direction
     56        // upwards the listener)
     57        void setOri(std::vector<float> at, std::vector<float> up);
    5458
    55                 // Set listener orientation (first is direction
    56                 // the listener looks at, the second is the direction
    57                 // upwards the listener)
    58                 void setOri(std::vector<float> at, std::vector<float> up);
     59        // Update
     60        void tick(float dt);
    5961
    60                 // Update
    61                 void tick(float dt);
     62        void ambientAdd(std::string file);
     63        void ambientStart();
     64        void ambientStop();
    6265
    63                 void ambientAdd(std::string file);
    64                 void ambientStart();
    65                 void ambientStop();
    66 
    67         private:
    68 
    69                 // Background sound
    70     std::vector<AudioStream*> bgSounds;
    71                 int currentBgSound;
     66    private:
     67        // Background sound
     68        std::vector<AudioStream*> bgSounds;
     69        int currentBgSound;
    7270
    7371
     72        std::string ambientPath;
    7473
    75                 std::string ambientPath;
     74        // Vector containing all audio files
     75        std::vector<AudioBuffer*> buffers;
     76        // Vector containing all audio sources which referer to one buffer
     77        std::vector<AudioSource*> sources;
     78        // The ambient background sound
     79        AudioSource* ambient;
    7680
    77                 // Vector containing all audio files
    78                 std::vector<AudioBuffer*> buffers;
    79                 // Vector containing all audio sources which referer to one buffer
    80                 std::vector<AudioSource*> sources;
    81                 // The ambient background sound
    82                 AudioSource* ambient;
    83 
    84                 std::vector<float> listenerPosition;
    85                 std::vector<float> listenerSpeed;
    86                 std::vector<float> listenerAt;
    87                 std::vector<float> listenerup;
    88         };
     81        std::vector<float> listenerPosition;
     82        std::vector<float> listenerSpeed;
     83        std::vector<float> listenerAt;
     84        std::vector<float> listenerup;
     85    };
    8986}
    9087
Note: See TracChangeset for help on using the changeset viewer.