Ticket #8259: indy3amisound.diff

File indy3amisound.diff, 1008 bytes (added by SF/quietust, 21 years ago)

Code patch to support Amiga indy3 sound effects

  • \scumm\sound.cpp

    old new  
    487487                return;
    488488        }
    489489       
     490        if (_scumm->_features & GF_AMIGA && _scumm->_gameId == GID_INDY3)
     491        {
     492                // experimental support for Indy3 Amiga sound effects
     493                if (READ_BE_UINT16(ptr + 26) == 0x00FF)         // looped sound
     494                        flags = 0;      // not sure how to handle this - if I tell it to loop, it'll never stop
     495                else if (READ_BE_UINT16(ptr + 26) == 0x0001)    // nonlooped sound
     496                        flags = 0;      //
     497                else if (READ_BE_UINT16(ptr + 26) == 0x0101)    // background music
     498                        return;         // no idea
     499                else    debug(3,"Unknown sound type detected!");
     500                size = READ_BE_UINT16(ptr + 12);        // or ptr + 14, both contain the same value
     501                rate = 11000;
     502                _scumm->_mixer->playRaw(NULL, ptr + 28, size, rate, flags, soundID);
     503                return;
     504        }
     505
    490506        if (_scumm->_features & GF_OLD_BUNDLE) {
    491507                //TODO: support maniac v1 sounds
    492508                if ((_scumm->_version == 1) && (_scumm->_gameId == GID_MANIAC))