Ticket #8070: soundfix.diff

File soundfix.diff, 1.2 KB (added by eriktorbjorn, 22 years ago)

Patch against a September 28 CVS snapshot

  • scummvm/scumm/sound.cpp

    diff -ur ScummVM-cvs20020928/scummvm/scumm/sound.cpp ScummVM-cvs20020928+hack/scummvm/scumm/sound.cpp
    old new  
    386386
    387387        if (_talk_sound_mode != 0) {
    388388                if (_talk_sound_mode & 1)
    389 
    390389                        startTalkSound(_talk_sound_a1, _talk_sound_b1, 1);
    391390                if (_talk_sound_mode & 2)
    392391                        _talkChannel = startTalkSound(_talk_sound_a2, _talk_sound_b2, 2);
     
    687686        int rate, comp;
    688687        byte *data;
    689688
    690         // FIXME: Day of the Tentacle frequently assumes that starting one sound
    691         // effect will automatically stop any other that may be playing at that
    692         // time. Do any other games need this?
    693 
    694         if (_scumm->_gameId == GID_TENTACLE)
    695                 stopSfxSound();
     689        // FIXME: Some games frequently assume that starting one sound effect
     690        // will automatically stop any other that may be playing at that time.
     691        // Do any other games need this?
     692
     693        if (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX) {
     694                for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
     695                        if (i != _talkChannel)
     696                                _scumm->_mixer->stop(i);
     697                }
     698        }
    696699
    697700#ifdef COMPRESSED_SOUND_FILE
    698701        if (file_size > 0) {