Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2007, 11:47:05 PM (18 years ago)
Author:
nicolape
Message:

We now have a background sound playlist

File:
1 edited

Legend:

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

    r424 r430  
    44namespace audio
    55{
    6         void AudioStream::open(std::string path)
     6        AudioStream::AudioStream(std::string path)
     7        {
     8                this->path = path;
     9                loaded = false;
     10        }       
     11
     12        void AudioStream::open()
    713        {
    814            int result;
    9                         loaded = false;
    10            
    11 
    12             path = "audio/ambient/" + path + ".ogg";
     15
    1316           
    1417            if(!(oggFile = fopen(path.c_str(), "rb")))
     
    5356        void AudioStream::release()
    5457        {
    55                 if (loaded)
    56                 {
     58
    5759            alSourceStop(source);
    5860            empty();
     
    6466            ov_clear(&oggStream);
    6567                        loaded = false;
    66                 }
     68               
    6769        }
    6870       
     
    155157            }
    156158       
     159                        if (active==false)
     160                        {
     161                                loaded = false;
     162                        }
    157163            return active;
    158164        }
Note: See TracChangeset for help on using the changeset viewer.