Ticket #8077: soundfix.diff

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

Patch against an October 1 CVS snapshot

  • scummvm/scumm/sound.cpp

    diff -ur ScummVM-cvs20021001/scummvm/scumm/sound.cpp ScummVM-cvs20021001+hack/scummvm/scumm/sound.cpp
    old new  
    461461                return -1;
    462462        }
    463463
     464        // Some games frequently assume that starting one sound effect will
     465        // automatically stop any other that may be playing at that time. So
     466        // that is what we do here, but we make an exception for speech.
     467        //
     468        // Do any other games than these need this hack?
     469
     470        if (mode == 1 && (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX)) {
     471                for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
     472                        if (i != _talkChannel)
     473                                _scumm->_mixer->stop(i);
     474                }
     475        }
     476
    464477        if (b > 8) {
    465478                num = (b - 8) >> 1;
    466479        }
     
    703716        int rate, comp;
    704717        byte *data;
    705718
    706         // FIXME: Some games frequently assume that starting one sound effect
    707         // will automatically stop any other that may be playing at that time.
    708         // Do any other games need this?
    709 
    710         if (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX) {
    711                 for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
    712                         if (i != _talkChannel)
    713                                 _scumm->_mixer->stop(i);
    714                 }
    715         }
    716 
    717719#ifdef COMPRESSED_SOUND_FILE
    718720        if (file_size > 0) {
    719721                data = (byte *)calloc(file_size + MAD_BUFFER_GUARD, 1);