now fade out of music when starting game and fade out of music when ending game

This commit is contained in:
Mark Vejvoda
2011-10-21 19:52:55 +00:00
parent c6d4e898a0
commit 14736ddfb7
11 changed files with 94 additions and 17 deletions

View File

@@ -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();
}
}

View File

@@ -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);
}
}