CINE: OS: Fix pitch of Amiga music by halving it.

Fix playing pitch of Amiga music in Operation Stealth by halving it.
Fixes bug #11676.
This commit is contained in:
Kari Salminen 2020-09-05 23:04:23 +03:00 committed by Eugene Sandulenko
parent d206dbcdae
commit 3be1744666

View File

@ -1402,7 +1402,10 @@ void PaulaSound::loadMusic(const char *name) {
byte *buf = readBundleSoundFile(name, &size);
if (buf) {
Common::MemoryReadStream s(buf, size);
_moduleStream = Audio::makeSoundFxStream(&s, readBundleSoundFile, _mixer->getOutputRate());
// Operation Stealth for Amiga has to have its music frequency halved
// or otherwise the music sounds too high pitched.
const int periodScaleDivisor = 2;
_moduleStream = Audio::makeSoundFxStream(&s, readBundleSoundFile, _mixer->getOutputRate(), true, periodScaleDivisor);
free(buf);
}
}