Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6726


Ignore:
Timestamp:
Apr 14, 2010, 2:19:32 PM (14 years ago)
Author:
erwin
Message:

Some more atempts to fix maybe it's platform specific…

Location:
code/branches/sound5/src/orxonox/sound
Files:
3 edited

Legend:

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

    r6506 r6726  
    142142        if (ALint error = alGetError())
    143143            COUT(2) << "Sound: Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl;
    144         assert(this->soundBuffer_ != NULL);
    145         alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
     144        if(this->soundBuffer_ != NULL) {
     145            alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
     146        }
    146147        if (ALuint error = alGetError())
    147148            COUT(1) << "Sound: Error: Could not set buffer \"" << this->source_ << "\": " << getALErrorString(error) << std::endl;
  • code/branches/sound5/src/orxonox/sound/BaseSound.h

    r6506 r6726  
    8686        virtual ~BaseSound();
    8787
    88         void doPlay();
    89         void doStop();
    90         void doPause();
     88        virtual void doPlay();
     89        virtual void doStop();
     90        virtual void doPause();
    9191
    9292        // network callbacks
  • code/branches/sound5/src/orxonox/sound/SoundStreamer.cc

    r6674 r6726  
    6868
    6969        char inbuffer[4096];
    70         ALuint initbuffers[20];
    71         alGenBuffers(20, initbuffers);
     70        ALuint initbuffers[5];
     71        alGenBuffers(5, initbuffers);
    7272        if (ALint error = alGetError()) {
    7373            COUT(2) << "Sound: Streamer: Could not generate buffer:" << getALErrorString(error) << std::endl;
     
    7676        int current_section;
    7777
    78         for(int i = 0; i < 20; i++)
     78        for(int i = 0; i < 5; i++)
    7979        {
    8080            long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, &current_section);
     
    9999                 COUT(2) << "Sound: Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl;
    100100             }
    101              COUT(4) << "Sound: " << ret << std::endl;
    102101        }
    103102
     
    116115                COUT(2) << "Sound: Warning: Couldn't get number of processed buffers: " << getALErrorString(error) << std::endl;
    117116
    118             COUT(2) << "Sound: Blub: " << processed << std::endl;
    119117            if(processed > 0)
    120118            {
     
    130128                    if (ret == 0)
    131129                    {
    132                         break;
     130                        return;
    133131                    }
    134132                    else if (ret < 0)
Note: See TracChangeset for help on using the changeset viewer.