Issue Resolved:
Use the supersound.dll in Sephs engine, not the one posted in the gamemaker thread or else you'd have some serious problems.
I'm having a really strange issue and I'm not sure why it's happening. I have ideas as to why it is but I haven't fully tested it yet.
I'm at the very least certain that it is a sound issue. I'm using an edited version of Seph's Engine in which I'm loading all the music at the beginning of the game.
Link to Sephs Engine:
https://www.iwannacommunity.com/forum/index.php?topic=921.0Sound Management Changes on mine:
Sound Load at Start of Game:
/// Music and Sounds defined here.
if start = true { counter += 1 }
switch(counter) {
case 1:
// Player Sounds
global.sfxPlayerShoot = SS_LoadSound("SFX/sfxPlayerShoot.wav");
global.sfxPlayerDeath = SS_LoadSound("SFX/sfxPlayerDeath.wav");
global.sfxPlayerJump = SS_LoadSound("SFX/sfxPlayerJump.wav");
global.sfxPlayerDJump = SS_LoadSound("SFX/sfxPlayerDJump.wav");
break;
case 2:
// Menu Sounds
global.sfxMenuBack = SS_LoadSound("SFX/sfxMenuBack.wav");
global.sfxMenuSelect = SS_LoadSound("SFX/sfxMenuSelect.wav");
global.sfxMenuClick = SS_LoadSound("SFX/sfxMenuClick.wav");
global.sfxMenuSFXTest = SS_LoadSound("SFX/sfxMenuSFXTest.wav");
break;
case 3:
// Title Music
global.bgmTitle = SS_LoadSound("BGM/bgmTitle.ogg")
break;
case 4:
// Stage Music
global.bgmStage1 = SS_LoadSound("BGM/bgmStage1.ogg")
break;
case 5:
flag = true; start = false
break;
}
if flag = true { room_goto(rIntro) }
musicFunctions - run on Room Start
/*
Sample Code General
-
if filePlaying != 1 { filePlaying = 1; SS_StopSound(bgm); bgm = global.bgmTitle; SS_LoopSound(bgm); }
if global.bgmOn = true { SS_SetSoundVol(bgm,7000+(global.bgmVolume*30)); } else { SS_SetSoundVol(bgm,0); }
-
Sample Code Same Room - Play on Restart
-
if filePlaying != 1 { SS_StopSound(bgm); bgm = global.bgmTitle; SS_LoopSound(bgm); }
if global.bgmOn = true { SS_SetSoundVol(bgm,7000+(global.bgmVolume*30)); } else { SS_SetSoundVol(bgm,0); }
-
*/
switch(room){
// Title Screen & Main Menu
case rTitle:
case rMenu:
case rMenu2:
case rMenu3:
case rMenu4:
case rMenu5:
if filePlaying != 1 { filePlaying = 1; SS_StopSound(bgm); bgm = global.bgmTitle; SS_LoopSound(bgm); }
if global.bgmOn = true { SS_SetSoundVol(bgm,7000+(global.bgmVolume*30)); } else { SS_SetSoundVol(bgm,0); }
break;
// Stage 1a - 1z
case rStage1a:
case rStage1b:
case rStage1c:
case rStage1d:
if filePlaying != 2 { filePlaying = 2; SS_StopSound(bgm); bgm = global.bgmStage1; SS_LoopSound(bgm); }
if global.bgmOn = true { SS_SetSoundVol(bgm,7000+(global.bgmVolume*30)); } else { SS_SetSoundVol(bgm,0); }
break;
}
scrFreeSound() - I attempted using this on on Esc press before game_end();
SS_FreeSound(global.sfxPlayerShoot)
SS_FreeSound(global.sfxPlayerJump)
SS_FreeSound(global.sfxPlayerDJump)
SS_FreeSound(global.sfxPlayerShoot)
SS_FreeSound(global.sfxPlayerDeath)
SS_FreeSound(global.sfxPlayerJump)
SS_FreeSound(global.sfxPlayerDJump)
SS_FreeSound(global.sfxMenuBack)
SS_FreeSound(global.sfxMenuSelect)
SS_FreeSound(global.sfxMenuClick)
SS_FreeSound(global.sfxMenuSFXTest)
SS_FreeSound(global.bgmTitle)
SS_FreeSound(global.bgmStage1)
SS_Unload();
ESC Game End
/// Save Data and Close Game
// Save Data
if(room != rInit && room != rMenu && room != rIntro && room != rTitle && room != rMenu2 && room != rMenu3 && room != rMenu4 && room != rMenu5) { saveDeathTime(); }
// Unload SS
SS_Unload();
// Close Game
game_end();
Issue: After running the game multiple times eventually sounds on my computer stop playing (outside of streams for some reason) and I have to restart to fix the issue.
Idea: I'm not using SS_FreeSound(sound) at game end and I think this might be causing an issue. I think what's happening it's just pooling and causing this issue but when I tried to remedy this, on game end the game had crashed. I didn't extensively try to fix that problem.
I also took out cleanmem.dll since I wasn't seeing what it was doing and it appeared to have no real effect on the game.
This problem is above me and I can't really figure out why this is happening.
I believe cleanmem.dll might fix the problem and I believe this has something to do with it but I'm not sure.
I heard that SSound has a bug that won't unload sound in windows 7 or more. is this version for fixing that bug?