mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 04:35:16 +00:00
found and use another table, soundeffects in intro are now working
svn-id: r42594
This commit is contained in:
parent
9e16e3b3e6
commit
923f9b975b
@ -41,7 +41,7 @@ const char *const SoundAmiga::kFilenameTable[3][2] = {
|
||||
};
|
||||
|
||||
SoundAmiga::SoundAmiga(KyraEngine_v1 *vm, Audio::Mixer *mixer) :
|
||||
Sound(vm, mixer), _driver(0), _fileLoaded(-1) {
|
||||
Sound(vm, mixer), _driver(0), _fileLoaded((uint)-1) {
|
||||
}
|
||||
|
||||
SoundAmiga::~SoundAmiga() {
|
||||
@ -96,21 +96,75 @@ void SoundAmiga::beginFadeOut() {
|
||||
|
||||
void SoundAmiga::playSoundEffect(uint8 track) {
|
||||
debug("play sfx %d", track);
|
||||
|
||||
// intro
|
||||
assert(track < ARRAYSIZE(tableEffectsIntro));
|
||||
const EffectEntry &entry = tableEffectsIntro[track];
|
||||
_driver->playNote(entry.note, entry.patch, entry.duration, entry.volume, entry.pan != 0);
|
||||
if (!_mixer->isSoundHandleActive(_soundChannels[0]))
|
||||
_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundChannels[0], _driver);
|
||||
|
||||
|
||||
/* // ingame?
|
||||
uint16 extVar = 1; // maybe indicates music playing or enabled
|
||||
uint16 extVar2 = 1; // no idea
|
||||
uint16 extVar2 = 1; // sound loaded ?
|
||||
if (0x61 <= track && track <= 0x63 && extVar) {
|
||||
assert(false);//some music-commands
|
||||
}
|
||||
assert(track < ARRAYSIZE(kEffectsTable));
|
||||
const EffectEntry &entry = kEffectsTable[track];
|
||||
if (extVar2 && entry.note) {
|
||||
_driver->playNote(entry.note, entry.patch, entry.duration, entry.volume, entry.pan != 0);
|
||||
byte pan = (entry.pan == 2) ? 0 : entry.pan;
|
||||
_driver->playNote(entry.note, entry.patch, entry.duration, entry.volume, pan != 0);
|
||||
if (!_mixer->isSoundHandleActive(_soundChannels[0]))
|
||||
_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundChannels[0], _driver);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
const SoundAmiga::EffectEntry SoundAmiga::kEffectsTable[120] = {
|
||||
const SoundAmiga::EffectEntry SoundAmiga::tableEffectsIntro[40] = {
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 110, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 110, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 110, 0 },
|
||||
{ 0x1B91, 0x3C, 0x13, 110, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x2677, 0x3C, 0x16, 110, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x1198, 0x3C, 0x17, 110, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 110, 0 },
|
||||
{ 0x22D1, 0x3C, 0x18, 110, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 110, 0 },
|
||||
{ 0x0224, 0x45, 0x03, 110, 0 },
|
||||
{ 0x2677, 0x3C, 0x16, 110, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 }
|
||||
};
|
||||
|
||||
const SoundAmiga::EffectEntry SoundAmiga::tableEffectsGame[120] = {
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x01, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
@ -131,106 +185,106 @@ const SoundAmiga::EffectEntry SoundAmiga::kEffectsTable[120] = {
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 1 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 1 },
|
||||
{ 0x122B, 0x3C, 0x17, 120, 1 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 1 },
|
||||
{ 0x0224, 0x45, 0x03, 120, 1 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 1 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 2 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 2 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 2 },
|
||||
{ 0x122B, 0x3C, 0x17, 120, 2 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 2 },
|
||||
{ 0x0224, 0x45, 0x03, 120, 2 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x0910, 0x2C, 0x04, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 1 },
|
||||
{ 0x138B, 0x25, 0x1B, 120, 1 },
|
||||
{ 0x0F52, 0x18, 0x03, 120, 1 },
|
||||
{ 0x0622, 0x3E, 0x1C, 120, 1 },
|
||||
{ 0x0754, 0x3B, 0x1C, 120, 1 },
|
||||
{ 0x206F, 0x16, 0x03, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x09EA, 0x3C, 0x1D, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x0910, 0x2C, 0x04, 120, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 2 },
|
||||
{ 0x138B, 0x25, 0x1B, 120, 2 },
|
||||
{ 0x0F52, 0x18, 0x03, 120, 2 },
|
||||
{ 0x0622, 0x3E, 0x1C, 120, 2 },
|
||||
{ 0x0754, 0x3B, 0x1C, 120, 2 },
|
||||
{ 0x206F, 0x16, 0x03, 120, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x09EA, 0x3C, 0x1D, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x036E, 0x3C, 0x1E, 120, 1 },
|
||||
{ 0x122B, 0x3C, 0x17, 120, 1 },
|
||||
{ 0x0991, 0x4E, 0x0B, 120, 1 },
|
||||
{ 0x02BC, 0x47, 0x1B, 120, 1 },
|
||||
{ 0x0211, 0x4C, 0x1B, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x036E, 0x3C, 0x1E, 120, 2 },
|
||||
{ 0x122B, 0x3C, 0x17, 120, 2 },
|
||||
{ 0x0991, 0x4E, 0x0B, 120, 2 },
|
||||
{ 0x02BC, 0x47, 0x1B, 120, 2 },
|
||||
{ 0x0211, 0x4C, 0x1B, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 1 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 1 },
|
||||
{ 0x0E9E, 0x3C, 0x1F, 120, 1 },
|
||||
{ 0x010C, 0x3C, 0x20, 120, 1 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 2 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 2 },
|
||||
{ 0x0E9E, 0x3C, 0x1F, 120, 2 },
|
||||
{ 0x010C, 0x3C, 0x20, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x0F7C, 0x3C, 0x21, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x0F7C, 0x3C, 0x21, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x4C47, 0x2A, 0x0B, 120, 1 },
|
||||
{ 0x4C47, 0x2A, 0x0B, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0528, 0x3C, 0x1B, 120, 1 },
|
||||
{ 0x0528, 0x3C, 0x1B, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0910, 0x2C, 0x04, 120, 1 },
|
||||
{ 0x0910, 0x2C, 0x04, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0AEE, 0x3C, 0x22, 120, 1 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 1 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 1 },
|
||||
{ 0x0AEE, 0x3C, 0x22, 120, 2 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 2 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0AEE, 0x3C, 0x22, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x1419, 0x32, 0x23, 156, 1 },
|
||||
{ 0x171C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x0622, 0x3E, 0x1C, 120, 1 },
|
||||
{ 0x0201, 0x43, 0x13, 120, 1 },
|
||||
{ 0x1243, 0x3C, 0x24, 90, 1 },
|
||||
{ 0x00EE, 0x3E, 0x20, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x19EA, 0x29, 0x04, 120, 1 },
|
||||
{ 0x0AEE, 0x3C, 0x22, 120, 2 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x1419, 0x32, 0x23, -100, 2 },
|
||||
{ 0x171C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x0622, 0x3E, 0x1C, 120, 2 },
|
||||
{ 0x0201, 0x43, 0x13, 120, 2 },
|
||||
{ 0x1243, 0x3C, 0x24, 90, 2 },
|
||||
{ 0x00EE, 0x3E, 0x20, 120, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x19EA, 0x29, 0x04, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x010C, 0x3C, 0x20, 120, 1 },
|
||||
{ 0x30B6, 0x3C, 0x25, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x010C, 0x3C, 0x20, 120, 2 },
|
||||
{ 0x30B6, 0x3C, 0x25, 120, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 1 },
|
||||
{ 0x1E97, 0x3C, 0x16, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 1 },
|
||||
{ 0x39F3, 0x1B, 0x04, 120, 1 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 1 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 1 },
|
||||
{ 0x19EA, 0x29, 0x06, 80, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 2 },
|
||||
{ 0x39F3, 0x1B, 0x04, 120, 2 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 2 },
|
||||
{ 0x1B91, 0x3C, 0x15, 120, 2 },
|
||||
{ 0x19EA, 0x29, 0x06, 80, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 1 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 1 },
|
||||
{ 0x0713, 0x3C, 0x26, 120, 1 },
|
||||
{ 0x0713, 0x3C, 0x26, 120, 1 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 1 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 1 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 1 },
|
||||
{ 0x3AEB, 0x3C, 0x1A, 120, 2 },
|
||||
{ 0x252C, 0x3C, 0x19, 120, 2 },
|
||||
{ 0x0713, 0x3C, 0x26, 120, 2 },
|
||||
{ 0x0713, 0x3C, 0x26, 120, 2 },
|
||||
{ 0x272C, 0x3C, 0x14, 120, 2 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 2 },
|
||||
{ 0x1699, 0x30, 0x23, 80, 2 },
|
||||
{ 0x0000, 0x00, 0x00, 0, 0 },
|
||||
{ 0x0156, 0x3C, 0x13, 120, 1 }
|
||||
{ 0x0156, 0x3C, 0x13, 120, 2 }
|
||||
};
|
||||
|
||||
} // end of namespace Kyra
|
@ -316,7 +316,7 @@ protected:
|
||||
uint8 patch;
|
||||
int8 volume;
|
||||
int8 pan;
|
||||
} kEffectsTable[120];
|
||||
} tableEffectsIntro[40], tableEffectsGame[120];
|
||||
};
|
||||
|
||||
} // end of namespace Kyra
|
||||
|
Loading…
x
Reference in New Issue
Block a user