From f5b493d7353ecc46b073de0dc822a4272d4e39e0 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 9 Mar 2005 13:41:33 +0000 Subject: Add HE sound todos svn-id: r17050 --- scumm/sound.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'scumm') diff --git a/scumm/sound.cpp b/scumm/sound.cpp index c3d184701f..ec88299ef4 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -814,16 +814,22 @@ int Sound::isSoundRunning(int sound) const { return pollCD(); if (_vm->_features & GF_HUMONGOUS) { - if (sound == -2 || sound >= 10001) { - // Maybe checks sound channel? - return !isSfxFinished(); - } else if (sound == -1 || sound == 10000) { + if (sound == -2) { + return -1; + } else if (sound == -1) { // getSoundStatus(), with a -1, will return the // ID number of the first active music it finds. - if (_vm->_heversion >= 70 || _currentMusic) + if (_currentMusic) sound = _currentMusic; else if (_vm->_imuse) return (_vm->_imuse->getSoundStatus(sound)); + } else if (sound >= 10000) { + // TODO report sound ID on channel + // channel = sound - 10000 + if (sound == 10000) + return _currentMusic; + else + return 0; } } @@ -899,14 +905,18 @@ void Sound::stopSound(int sound) { int i; if (_vm->_features & GF_HUMONGOUS) { - if (sound == -2 || sound >= 10001) { - // TODO: Stop sound channel (sound - 100000) - } else if (sound == -1 || sound == 10000) { + if (sound == -2) { + } else if (sound == -1) { // Stop current music - if (_vm->_heversion >= 70 || _currentMusic) + if (_currentMusic) _vm->_mixer->stopID(_currentMusic); else if (_vm->_imuse) _vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1)); + } else if ( sound >= 10000) { + // TODO: Stop sound channel + // channel = sound - 10000 + if (sound == 10000) + _vm->_mixer->stopID(_currentMusic); } } -- cgit v1.2.3