mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 23:45:14 +02:00
now fade out of music when starting game and fade out of music when ending game
This commit is contained in:
@@ -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