mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +02:00
now fade out of music when starting game and fade out of music when ending game
This commit is contained in:
@@ -117,7 +117,7 @@ public:
|
||||
virtual void play(StaticSound *staticSound);
|
||||
virtual void play(StrSound *strSound, int64 fadeOn=0);
|
||||
virtual void stop(StrSound *strSound, int64 fadeOff=0);
|
||||
virtual void stopAllSounds();
|
||||
virtual void stopAllSounds(int64 fadeOff=0);
|
||||
virtual void updateStreams(); //updates str buffers if needed
|
||||
|
||||
private:
|
||||
|
@@ -100,7 +100,7 @@ public:
|
||||
virtual void play(StaticSound *staticSound);
|
||||
virtual void play(StrSound *strSound, int64 fadeOn=0);
|
||||
virtual void stop(StrSound *strSound, int64 fadeOff=0);
|
||||
virtual void stopAllSounds();
|
||||
virtual void stopAllSounds(int64 fadeOff=0);
|
||||
virtual void updateStreams(); //updates str buffers if needed
|
||||
|
||||
private:
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
virtual void play(StaticSound *staticSound)= 0;
|
||||
virtual void play(StrSound *strSound, int64 fadeOn=0)= 0; //delay and fade in miliseconds
|
||||
virtual void stop(StrSound *strSound, int64 fadeOff=0)= 0;
|
||||
virtual void stopAllSounds()= 0;
|
||||
virtual void stopAllSounds(int64 fadeOff=0)= 0;
|
||||
virtual void updateStreams()= 0;
|
||||
virtual bool wasInitOk() const { return initOk; }
|
||||
};
|
||||
|
@@ -427,12 +427,12 @@ void SoundPlayerDs8::stop(StrSound *strSound, int64 fadeOff){
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPlayerDs8::stopAllSounds(){
|
||||
void SoundPlayerDs8::stopAllSounds(int64 fadeOff){
|
||||
if(initOk == false) return;
|
||||
|
||||
for(unsigned int i=0; i<params.strBufferCount; ++i){
|
||||
if(!strSoundBuffers[i].isFree()){
|
||||
strSoundBuffers[i].stop(0);
|
||||
strSoundBuffers[i].stop(fadeOff);
|
||||
strSoundBuffers[i].end();
|
||||
}
|
||||
}
|
||||
|
@@ -505,7 +505,7 @@ void SoundPlayerOpenAL::stop(StrSound* strSound, int64 fadeOff) {
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPlayerOpenAL::stopAllSounds() {
|
||||
void SoundPlayerOpenAL::stopAllSounds(int64 fadeOff) {
|
||||
if(initOk == false) return;
|
||||
|
||||
for(StaticSoundSources::iterator i = staticSources.begin();
|
||||
@@ -516,7 +516,7 @@ void SoundPlayerOpenAL::stopAllSounds() {
|
||||
for(StreamSoundSources::iterator i = streamSources.begin();
|
||||
i != streamSources.end(); ++i) {
|
||||
StreamSoundSource* source = *i;
|
||||
source->stop();
|
||||
source->stop(fadeOff);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user