aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge/sound.cpp
diff options
context:
space:
mode:
authoryinsimei2017-07-05 09:35:50 +0200
committerEugene Sandulenko2017-07-13 18:27:45 +0200
commit874d03f79be2df77db72767e05bc7b019a8a961e (patch)
tree8390ab2b5bc5a0e67758bfeb3c473bf0376bf4ba /engines/sludge/sound.cpp
parent0e8db2bf0d5cd03b23694440fbb05d51f1a02879 (diff)
downloadscummvm-rg350-874d03f79be2df77db72767e05bc7b019a8a961e.tar.gz
scummvm-rg350-874d03f79be2df77db72767e05bc7b019a8a961e.tar.bz2
scummvm-rg350-874d03f79be2df77db72767e05bc7b019a8a961e.zip
SLUDGE: stop a sound by file number
SLUDGE: stop a sound by
Diffstat (limited to 'engines/sludge/sound.cpp')
-rw-r--r--engines/sludge/sound.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/sludge/sound.cpp b/engines/sludge/sound.cpp
index 56a28d82eb..745c3a2a09 100644
--- a/engines/sludge/sound.cpp
+++ b/engines/sludge/sound.cpp
@@ -189,21 +189,16 @@ void stopMOD(int i) {
void huntKillSound(int filenum) {
if (!soundOK)
return;
-#if 0
- // Clear OpenAL errors to make sure they don't block anything:
- alGetError();
int gotSlot = findInSoundCache(filenum);
if (gotSlot == -1) return;
SilenceIKillYou = true;
- if (soundCache[gotSlot].playing) {
- if (! alureStopSource(soundCache[gotSlot].playingOnSource, AL_TRUE)) {
- debugOut("Failed to stop source: %s\n", alureGetErrorString());
- }
+ if (g_sludge->_mixer->isSoundHandleActive(soundCache[gotSlot].handle)) {
+ g_sludge->_mixer->stopHandle(soundCache[gotSlot].handle);
}
-#endif
+
SilenceIKillYou = false;
}