Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 1, 2010, 4:24:59 PM (14 years ago)
Author:
erwin
Message:

A few new tries to fix the sound problem: no success

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sound5/src/orxonox/sound/AmbientSound.cc

    r6562 r6674  
    194194        this->soundstreamthread_.interrupt();
    195195    }
     196
     197    void AmbientSound::doPlay()
     198    {
     199        BaseSound::doPlay();
     200
     201        if(GameMode::playsSound() && this->getSourceState() != AL_PLAYING)
     202        {
     203            if(!alIsSource(this->audioSource_))
     204            {
     205                this->audioSource_ = SoundManager::getInstance().getSoundSource(this);
     206                if(!alIsSource(this->audioSource_))
     207                    return;
     208                this->initialiseSource();
     209            }
     210
     211            alSourcePlay(this->audioSource_);
     212            if(int error = alGetError())
     213                COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;
     214        }
     215    }
    196216}
Note: See TracChangeset for help on using the changeset viewer.