aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-06-01 20:22:48 +0000
committerPaweł Kołodziejski2004-06-01 20:22:48 +0000
commit3f5c651551d134b45d78e60f9682611f8a7667d5 (patch)
tree7132ec9c3f97e39658df4319866ce8f48d77b8c2 /scumm/imuse_digi
parent136c7593d2dfaebb8110fbd5107be239bd6857dd (diff)
downloadscummvm-rg350-3f5c651551d134b45d78e60f9682611f8a7667d5.tar.gz
scummvm-rg350-3f5c651551d134b45d78e60f9682611f8a7667d5.tar.bz2
scummvm-rg350-3f5c651551d134b45d78e60f9682611f8a7667d5.zip
better fix for unloaded sound resources in imuse digi
svn-id: r13918
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp
index f0e423e955..1c5431e86c 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -90,7 +90,6 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, int slot) {
_sounds[slot].region = (_region *)malloc(sizeof(_region) * 70);
_sounds[slot].jump = (_jump *)malloc(sizeof(_jump));
_sounds[slot].resPtr = ptr;
- _vm->lock(rtSound, _sounds[slot].soundId);
_sounds[slot].bits = 8;
_sounds[slot].channels = 1;
@@ -302,6 +301,8 @@ ImuseDigiSndMgr::soundStruct *ImuseDigiSndMgr::openSound(int32 soundId, const ch
if (soundName[0] == 0) {
_sounds[slot].name[0] = 0;
if ((soundType == IMUSE_RESOURCE)) {
+ _vm->ensureResourceLoaded(rtSound, soundId);
+ _vm->lock(rtSound, soundId);
ptr = _vm->getResourceAddress(rtSound, soundId);
if (ptr == NULL) {
closeSound(&_sounds[slot]);