aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2009-07-07 07:02:04 +0000
committerTravis Howell2009-07-07 07:02:04 +0000
commit1e568222e470eb711e1f1487de1642fd5c1725ea (patch)
tree29c7d28b1a204156fe6f397d32ce14e6d7686f25 /engines
parent2e3419c8cb22a686446777b45042436b5098c47f (diff)
downloadscummvm-rg350-1e568222e470eb711e1f1487de1642fd5c1725ea.tar.gz
scummvm-rg350-1e568222e470eb711e1f1487de1642fd5c1725ea.tar.bz2
scummvm-rg350-1e568222e470eb711e1f1487de1642fd5c1725ea.zip
Set the correct sound rate for Personal Nightmare.
svn-id: r42202
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/res_snd.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index 60c79b2324..810f953bd7 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -527,6 +527,7 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) {
void AGOSEngine::loadSound(uint16 sound, uint16 freq, uint16 flags) {
byte *dst;
uint32 offs, size = 0;
+ uint32 rate = 8000;
if (_curSfxFile == NULL)
return;
@@ -570,13 +571,23 @@ void AGOSEngine::loadSound(uint16 sound, uint16 freq, uint16 flags) {
offs = READ_BE_UINT32(dst + 8);
}
- // TODO: Handle other sound flags and frequency
+ if (getGameType() == GType_PN) {
+ if (freq == 0) {
+ rate = 4600;
+ } else if (freq == 1) {
+ rate = 7400;
+ } else {
+ rate = 9400;
+ }
+ }
+
+ // TODO: Handle other sound flags in Amiga/AtariST versions
if (flags == 2 && _sound->isSfxActive()) {
- _sound->queueSound(dst + offs, sound, size, 8000);
+ _sound->queueSound(dst + offs, sound, size, rate);
} else {
if (flags == 0)
_sound->stopSfx();
- _sound->playRawData(dst + offs, sound, size, 8000);
+ _sound->playRawData(dst + offs, sound, size, rate);
}
}