Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2007, 11:29:16 PM (16 years ago)
Author:
nicolasc
Message:
  • removed setupCEGUI as it is not used nor does it work
  • some minor changes in audio
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/audio/AudioManager.cc

    r430 r458  
    77        AudioManager::AudioManager()
    88        {
    9                 ambientPath = "audio/ambient";
     9    ambientPath = "audio/ambient";
    1010
    11                 alutInit(NULL, 0);
    12                
    13            
    14 
     11    alutInit(NULL, 0);
    1512
    1613
    1714        }
    18                
     15
    1916        AudioManager::~AudioManager()
    2017        {
    2118                for (unsigned int i=0;i<=bgSounds.size();i++)
    2219                {
    23                         bgSounds[i].release(); 
     20                        bgSounds[i].release();
    2421                }
    2522                alutExit();
     
    4643        {
    4744                std::cout << "Stopped playing background sound"<<std::endl;
    48         }       
     45        }
    4946
    5047        void AudioManager::ambientAdd(std::string file)
    5148        {
    52     std::string path = ambientPath + "/" + file + ".ogg"; 
     49    std::string path = ambientPath + "/" + file + ".ogg";
    5350                AudioStream tmp(path);
    5451                tmp.open();
    5552                if (tmp.isLoaded())
    5653                {
    57                         bgSounds.push_back(tmp);       
     54                        bgSounds.push_back(tmp);
    5855                        std::cout << "Added background sound "<<file<<std::endl;
    5956                }
    6057        }
    61        
     58
    6259        void AudioManager::update()
    6360        {
     
    7774                                if (!playing)
    7875                                {
    79                                         if (currentBgSound < bgSounds.size()-1)
    80                                         {
    81                                                 currentBgSound++;
    82                                         }
    83                                         else
    84                                         {
    85                                                 currentBgSound=0;
    86                                         }
     76//                                      if (currentBgSound < bgSounds.size()-1)
     77//                                      {
     78//                                              currentBgSound++;
     79//                                      }
     80//                                      else
     81//                                      {
     82//                                              currentBgSound=0;
     83//                                      }
     84          // switch to next sound in list/array
     85          currentBgSound = ++currentBgSound % bgSounds.size();
     86
    8787                                        if (!bgSounds[currentBgSound].isLoaded())
    8888                                        {
     
    9696                }
    9797        }
    98        
     98
    9999        void AudioManager::setPos(std::vector<float> newPosition)
    100100        {
    101                
     101
    102102        }
    103103
    104104        void AudioManager::setSpeed(std::vector<float> newSpeed)
    105105        {
    106                
     106
    107107        }
    108108
    109109        void AudioManager::setOri(std::vector<float> at, std::vector<float> up)
    110110        {
    111                
     111
    112112        }
    113113}
Note: See TracChangeset for help on using the changeset viewer.