495 | | if ((_scumm->_features & GF_AMIGA) && (_scumm->_version == 3)) |
496 | | { |
497 | | // experimental support for Indy3 Amiga sound effects |
498 | | if (READ_BE_UINT16(ptr + 26) == 0x00FF) // looped sound |
499 | | // TODO: support looping sounds |
500 | | // ptr + 14 seems to be looping duration |
501 | | flags = 0; |
502 | | else if (READ_BE_UINT16(ptr + 26) == 0x0001) // nonlooped sound |
503 | | flags = 0; // |
504 | | else if (READ_BE_UINT16(ptr + 26) == 0x0101) // background music |
505 | | // TODO: support music |
| 495 | if ((_scumm->_features & GF_AMIGA) && (_scumm->_version == 3)) { |
| 496 | if (READ_BE_UINT16(ptr + 26) & 0x0100) { |
| 497 | // TODO: support Amiga music |
510 | | memcpy(sound,ptr + 28,size); |
511 | | _scumm->_mixer->playRaw(NULL, sound, size, rate, SoundMixer::FLAG_AUTOFREE, soundID); |
| 503 | memcpy(sound,ptr + READ_BE_UINT16(ptr + 8),size); |
| 504 | if (READ_BE_UINT16(ptr + 16) || READ_BE_UINT16(ptr + 6)) { |
| 505 | // the first check is for pitch-bending looped sounds (i.e. "pouring liquid", "biplane dive", etc.) |
| 506 | // the second check is for simple looped sounds |
| 507 | _scumm->_mixer->playRaw(NULL,sound,size,rate,SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_LOOP,soundID,READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8),READ_BE_UINT16(ptr + 14)); |
| 508 | } else { |
| 509 | _scumm->_mixer->playRaw(NULL,sound,size,rate,SoundMixer::FLAG_AUTOFREE,soundID); |
| 510 | } |