mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
SCUMM: fix minor bug in FM-TOWNS sound code
(multi channel pcm sounds did not get restored correctly after loading a save file)
This commit is contained in:
parent
832952d118
commit
8d1b07f054
@ -75,10 +75,19 @@ void Player_Towns::saveLoadWithSerializer(Serializer *ser) {
|
||||
}
|
||||
|
||||
void Player_Towns::restoreAfterLoad() {
|
||||
Common::Array<uint16> restoredSounds;
|
||||
|
||||
for (int i = 1; i < 9; i++) {
|
||||
if (!_pcmCurrentSound[i].index || _pcmCurrentSound[i].index == 0xffff)
|
||||
continue;
|
||||
|
||||
// Don't restart multichannel sounds more than once
|
||||
if (Common::find(restoredSounds.begin(), restoredSounds.end(), _pcmCurrentSound[i].index) != restoredSounds.end())
|
||||
continue;
|
||||
|
||||
if (!_v2)
|
||||
restoredSounds.push_back(_pcmCurrentSound[i].index);
|
||||
|
||||
uint8 *ptr = _vm->getResourceAddress(rtSound, _pcmCurrentSound[i].index);
|
||||
if (!ptr)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user