id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,game 8316,Possible fix for Sam & Max music glitch,eriktorbjorn,SF/ender,"{{{#!Markdown I've begun play-testing Sam & Max \(talkie version\) with a January 27 CVS snapshot, but got side-tracked on the following bug: When Doug tells me about the Ball of Twine, the music goes silent. This is what the script looks like: \[0D2E\] \(5D\) if \(ifClassOfIs\(102,\[19\]\)\) \{ \[0D3B\] \(AC\) soundKludge\(\[14,29,0,1,60,40\]\) \[0D51\] \(5F\) startScriptQuick\(45,\[102,1,1\]\) \[0D61\] \(6C\) break\(\) \[0D62\] \(AC\) soundKludge\(\[14,29,0,1,127,100\]\) \[0D78\] \(\*\*\) \} IMUSE command 14 is the Sam and Max ""parameter fade"", which is here used to fade down the volume of the Mole Man theme to 60. The US map is shown to reveal the location of the Ball of Twine, and then the Mole Man theme is faded back up. In theory. Unfortunately it's not able to find player 29. Apparently the US map script does one of those temporary save/restore kind of things, and ScummEngine::loadState\(\) will call \_sound->stopAllSounds\(\), causing the music to stop. The iMUSE state was not saved \(and therefore not restored\) because \_saveSound is 0 and \_saveLoadCompatible is 1. I can only assume that this is deliberate, but it does mean that the music won't be restarted. So in that case we shouldn't call stopAllSounds\(\). Maybe not stopCD\(\) either, but the CD state is always saved as far as I can see. Normally I might have simply applied this right away, but since we're getting close to 0.6.0 I'd like some feedback first to make sure I'm not missing anything important. }}} {{{#!div style=""font-size: 75%"" Ticket imported from: !#886058. Ticket imported from: patches/421. }}}",patch,closed,normal,Engine: SCUMM,,fixed,,,Sam and Max