Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2009, 12:46:24 AM (15 years ago)
Author:
erwin
Message:

first attempt to implement sounds for pong, only score sound is working here

Location:
code/trunk/src/orxonox/sound
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/sound/SoundBase.cc

    r3078 r3108  
    9797                alSourcei(this->source_, AL_LOOPING, AL_FALSE);
    9898            alSourcePlay(this->source_);
     99
     100            if(alGetError() != AL_NO_ERROR)
     101            {
     102                 COUT(2) << "Sound: OpenAL: Error playin sound " << this->source_ << std::endl;
     103            }
    99104        }
    100105    }
     
    161166        alGenSources(1, &this->source_);
    162167        alSourcei(this->source_, AL_BUFFER, this->buffer_);
    163 //         ALenum
    164168        if(alGetError() != AL_NO_ERROR) {
    165169            COUT(2) << "Sound: OpenAL: Error loading sample file: " << filename << std::endl;
  • code/trunk/src/orxonox/sound/SoundManager.cc

    r3092 r3108  
    5252        else
    5353        {
    54             COUT(4) << "Sound: OpenAL ALUT version: " << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
    55             const char* str = alutGetMIMETypes(ALUT_LOADER_BUFFER);
    56             if (str == NULL)
    57                 COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
    58             else
    59                 COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << str << std::endl;
    6054            if(SoundManager::device_s == NULL)
    6155            {
     
    8276                    if(alcMakeContextCurrent(this->context_) == AL_TRUE)
    8377                        COUT(3) << "Sound: OpenAL: Context " << this->context_ << " loaded" << std::endl;
     78
     79                    COUT(4) << "Sound: OpenAL ALUT version: " << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
     80                    const char* str = alutGetMIMETypes(ALUT_LOADER_BUFFER);
     81                    if (str == NULL)
     82                        COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
     83                    else
     84                        COUT(4) << "Sound: OpenAL ALUT supported MIME types: " << str << std::endl;
    8485                }
    8586            }
Note: See TracChangeset for help on using the changeset viewer.