Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2006, 4:57:51 PM (18 years ago)
Author:
amaechler
Message:

sound fixed

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r8471 r8480  
    3939
    4040/* TODO:
    41   - preCaching
    4241  - test multiple rain emitters
    4342  - Think about what happens with building poss. to hang movewithcam off
     
    6968    if(rainActivate) {
    7069        this->activate();
    71         RainEffect::rainParticles->precache((int)this->rainLife);
     70        RainEffect::rainParticles->precache((int)this->rainLife * 5); // TODO: Figure out the correct value
    7271    }
    7372}
     
    155154    this->emitter->setSpread(this->rainWindForce / 50, 0.2);
    156155
    157     this->soundSource.loop(this->rainBuffer, this->soundRainVolume);
     156    this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
     157
    158158    if (this->rainWindForce != 0)
    159         this->soundSource.loop(this->windBuffer, 0.1f * this->rainWindForce);
     159        this->soundSource.play(this->windBuffer, 0.1f * this->rainWindForce, true);
    160160
    161161    if (this->rainFadeInDuration == 0)
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h

    r8457 r8480  
    8282private:
    8383    static SparkParticles*      rainParticles;
    84     ParticleEmitter*      emitter;
     84    ParticleEmitter*            emitter;
    8585
    8686    GLfloat         rainFadeInDuration;
    8787    GLfloat         rainFadeOutDuration;
    88     float         localTimer;
     88    float           localTimer;
    8989
    9090    Vector          rainCoord;
     
    9494    GLfloat         rainLife;
    9595    GLfloat         rainMaxParticles;
    96     int         rainWindForce;
    97     bool          rainMove;
    98     bool          rainActivate;
     96    int             rainWindForce;
     97    bool            rainMove;
     98    bool            rainActivate;
    9999
    100100    OrxSound::SoundSource     soundSource;
  • branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc

    r8457 r8480  
    5353        }
    5454
    55         if(snowActivate)
     55  if(snowActivate) {
    5656                this->activate();
     57    SnowEffect::snowParticles->precache((int) this->snowLife);
     58  } 
    5759}
    5860
     
    139141        this->emitter->setSize(snowSize);
    140142
    141   SnowEffect::snowParticles->precache((int) this->snowLife);
    142 
    143         if (this->snowWindForce > 1)
    144                 this->soundSource.loop(this->windBuffer);
     143  if (this->snowWindForce != 0)
     144    this->soundSource.play(this->windBuffer, 0.1f * this->snowWindForce, true);
     145 
    145146}
    146147
Note: See TracChangeset for help on using the changeset viewer.