Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 1, 2011, 5:16:52 AM (14 years ago)
Author:
rgrieder
Message:

Reverted last commit (forgot to tick "Switch working copy to new branch"…)

Location:
code/branches/usability
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability

  • code/branches/usability/src/orxonox/sound/BaseSound.cc

    r8005 r8006  
    9292            alSourcePlay(this->audioSource_);
    9393            if (int error = alGetError())
    94                 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;
     94                COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;
    9595        }
    9696    }
     
    145145        alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
    146146        if (ALint error = alGetError())
    147             COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl;
    148         if(this->soundBuffer_ != NULL) {
    149             alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
    150         }
     147            COUT(2) << "Sound Warning: Setting source parameters to 0 failed: "
     148                    << SoundManager::getALErrorString(error) << std::endl;
     149        assert(this->soundBuffer_ != NULL);
     150        alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
    151151        if (ALuint error = alGetError())
    152             COUT(1) << "Sound: Error: Could not set buffer \"" << this->source_ << "\": " << getALErrorString(error) << std::endl;
     152            COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl;
    153153    }
    154154
     
    157157        this->volume_ = clamp(vol, 0.0f, 1.0f);
    158158        if (this->volume_ != vol)
    159             COUT(2) << "Sound: Warning: volume out of range, clamping value." << std::endl;
     159            COUT(2) << "Sound warning: volume out of range, clamping value." << std::endl;
    160160        this->updateVolume();
    161161    }
     
    168168            alSourcef(this->audioSource_, AL_GAIN, volume);
    169169            if (int error = alGetError())
    170                 COUT(2) << "Sound: Error setting volume to " << volume << ": " << getALErrorString(error) << std::endl;
     170                COUT(2) << "Sound: Error setting volume to " << volume
     171                        << ": " << SoundManager::getALErrorString(error) << std::endl;
    171172        }
    172173    }
     
    183184        if (pitch > 2 || pitch < 0.5f)
    184185        {
    185             COUT(2) << "Sound: Warning: pitch out of range, cropping value." << std::endl;
     186            COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;
    186187            pitch = pitch > 2.0f ? 2.0f : pitch;
    187188            pitch = pitch < 0.5f ? 0.5f : pitch;
     
    192193            alSourcef(this->audioSource_, AL_PITCH, pitch);
    193194            if (int error = alGetError())
    194                 COUT(2) << "Sound: Error setting pitch: " << getALErrorString(error) << std::endl;
     195                COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl;
    195196        }
    196197    }
     
    237238            if (ALuint error = alGetError())
    238239            {
    239                 COUT(1) << "Sound: Error: Could not set buffer \"" << source << "\": " << getALErrorString(error) << std::endl;
     240                COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl;
    240241                return;
    241242            }
     
    245246            alSourcePlay(this->audioSource_);
    246247            if (int error = alGetError())
    247                 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl;
     248                COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;
    248249            if (this->isPaused())
    249250                alSourcePause(this->audioSource_);
Note: See TracChangeset for help on using the changeset viewer.