SLUDGE: stop a sound by file number

SLUDGE: stop a sound by
This commit is contained in:
yinsimei 2017-07-05 09:35:50 +02:00 committed by Eugene Sandulenko
parent 0e8db2bf0d
commit 874d03f79b

View File

@ -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;
}