mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Removed FadeBackgroundMusic option (cur. disabled)
* because the fix code doesn't work on all supported systems.
This commit is contained in:
+1
-4
@@ -1,5 +1,5 @@
|
|||||||
;sfall configuration settings
|
;sfall configuration settings
|
||||||
;v3.8.33.1
|
;v3.8.33.2
|
||||||
|
|
||||||
[Main]
|
[Main]
|
||||||
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
|
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
|
||||||
@@ -103,9 +103,6 @@ WorldMapTerrainInfo=0
|
|||||||
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
|
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
|
||||||
NumSoundBuffers=0
|
NumSoundBuffers=0
|
||||||
|
|
||||||
;Set to 1 to enable fade effects for background music when stopping and starting the playback
|
|
||||||
FadeBackgroundMusic=1
|
|
||||||
|
|
||||||
;Set to 1 to allow attaching sound files to combat float messages
|
;Set to 1 to allow attaching sound files to combat float messages
|
||||||
AllowSoundForFloats=0
|
AllowSoundForFloats=0
|
||||||
|
|
||||||
|
|||||||
@@ -976,7 +976,7 @@ static void __declspec(naked) sfxl_init_hook() {
|
|||||||
retn;
|
retn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
static void __declspec(naked) internalSoundFade_hack() {
|
static void __declspec(naked) internalSoundFade_hack() {
|
||||||
__asm {
|
__asm {
|
||||||
mov ebp, ds:[FO_VAR_deviceInit];
|
mov ebp, ds:[FO_VAR_deviceInit];
|
||||||
@@ -1044,14 +1044,14 @@ skip:
|
|||||||
retn;
|
retn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
static const int SampleRate = 44100; // 44.1kHz
|
static const int SampleRate = 44100; // 44.1kHz
|
||||||
|
|
||||||
static bool fadeBgMusic = false;
|
//static bool fadeBgMusic = false;
|
||||||
|
|
||||||
void Sound::OnAfterGameInit() {
|
void Sound::OnAfterGameInit() {
|
||||||
*fo::ptr::sampleRate = SampleRate / 2; // Revert to 22kHz for secondary sound buffers
|
*fo::ptr::sampleRate = SampleRate / 2; // Revert to 22kHz for secondary sound buffers
|
||||||
if (fadeBgMusic) fo::var::setInt(FO_VAR_gsound_background_fade) = 1;
|
//if (fadeBgMusic) fo::var::setInt(FO_VAR_gsound_background_fade) = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sound::OnGameLoad() {
|
void Sound::OnGameLoad() {
|
||||||
@@ -1141,7 +1141,7 @@ void Sound::init() {
|
|||||||
HookCalls(sfxl_init_hook, sfxlInitAddr);
|
HookCalls(sfxl_init_hook, sfxlInitAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IniReader::GetConfigInt("Sound", "FadeBackgroundMusic", 1)) {
|
/*if (IniReader::GetConfigInt("Sound", "FadeBackgroundMusic", 1)) {
|
||||||
SafeMemSet(0x45020C, CodeType::Nop, 6); // gsound_reset_
|
SafeMemSet(0x45020C, CodeType::Nop, 6); // gsound_reset_
|
||||||
SafeWrite32(0x45212C, 250); // delay start
|
SafeWrite32(0x45212C, 250); // delay start
|
||||||
SafeWrite32(0x450ADE, 500); // delay stop
|
SafeWrite32(0x450ADE, 500); // delay stop
|
||||||
@@ -1153,7 +1153,7 @@ void Sound::init() {
|
|||||||
MakeCall(0x4AD991, soundContinue_hack, 1);
|
MakeCall(0x4AD991, soundContinue_hack, 1);
|
||||||
|
|
||||||
fadeBgMusic = true;
|
fadeBgMusic = true;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sound::exit() {
|
void Sound::exit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user