aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukaslw2014-07-23 21:21:33 +0200
committerlukaslw2014-07-23 21:21:33 +0200
commit35b276397a20a169d4f9301b7bfdbcb252253710 (patch)
treefda9ff33eafbc1ad38f295324f3201af87f1f307
parent933b6b7997824676208404f82d7f1d82a1dbe4b1 (diff)
downloadscummvm-rg350-35b276397a20a169d4f9301b7bfdbcb252253710.tar.gz
scummvm-rg350-35b276397a20a169d4f9301b7bfdbcb252253710.tar.bz2
scummvm-rg350-35b276397a20a169d4f9301b7bfdbcb252253710.zip
PRINCE: loadSample(), loadVoice() update
-rw-r--r--engines/prince/prince.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 767ef8652a..1fb323b448 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -616,8 +616,7 @@ bool PrinceEngine::loadSample(uint32 sampleSlot, const Common::String &streamNam
debugEngine("loadSample slot %d, name %s", sampleSlot, normalizedPath.c_str());
- _mixer->stopID(sampleSlot);
- _voiceStream[sampleSlot] = nullptr;
+ stopSample(sampleSlot);
_voiceStream[sampleSlot] = SearchMan.createReadStreamForMember(normalizedPath);
if (_voiceStream[sampleSlot] == nullptr) {
error("Can't load sample %s to slot %d", normalizedPath.c_str(), sampleSlot);
@@ -633,6 +632,7 @@ bool PrinceEngine::loadVoice(uint32 slot, uint32 sampleSlot, const Common::Strin
return false;
}
+ stopSample(sampleSlot);
_voiceStream[sampleSlot] = SearchMan.createReadStreamForMember(streamName);
if (!_voiceStream[sampleSlot]) {
error("Can't open %s", streamName.c_str());