aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/inter_v2.cpp')
-rw-r--r--engines/gob/inter_v2.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index f605b11720..95e13ff43a 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1401,7 +1401,16 @@ bool Inter_v2::o2_checkData(char &cmdCount, int16 &counter, int16 &retFlag) {
}
bool Inter_v2::o2_stopSound(char &cmdCount, int16 &counter, int16 &retFlag) {
- _vm->_snd->stopSound(_vm->_parse->parseValExpr());
+ int16 expr;
+
+ expr = _vm->_parse->parseValExpr();
+
+ if (expr < 0) {
+ if (_vm->_adlib)
+ _vm->_adlib->stopPlay();
+ } else
+ _vm->_snd->stopSound(expr);
+
_soundEndTimeKey = 0;
return false;
}