diff options
-rw-r--r-- | sky/intro.cpp | 2 | ||||
-rw-r--r-- | sky/musicbase.cpp | 1 | ||||
-rw-r--r-- | sky/sound.cpp | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/sky/intro.cpp b/sky/intro.cpp index edd55fde39..40de7526d4 100644 --- a/sky/intro.cpp +++ b/sky/intro.cpp @@ -482,6 +482,6 @@ void SkyState::introFx(uint32 *&cmdPtr) { void SkyState::introVol(uint32 *&cmdPtr) { - _mixer->setVolume(((cmdPtr[2] & 0x7F) + 1) << 1); + _skySound->playSound(1, (uint16)(cmdPtr[2] & 0x7F)); cmdPtr += 3; } diff --git a/sky/musicbase.cpp b/sky/musicbase.cpp index 254cbfb153..cc1670f996 100644 --- a/sky/musicbase.cpp +++ b/sky/musicbase.cpp @@ -26,6 +26,7 @@ SkyMusicBase::SkyMusicBase(SkyDisk *pSkyDisk) { _musicData = NULL; _allowedCommands = 0; _skyDisk = pSkyDisk; + _currentMusic = 0; } SkyMusicBase::~SkyMusicBase(void) diff --git a/sky/sound.cpp b/sky/sound.cpp index 6cfe26ee9d..0434a58995 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -38,7 +38,7 @@ SkySound::SkySound(SoundMixer *mixer, SkyDisk *pDisk) { SkySound::~SkySound(void) { - if (_ingameSound) _mixer->stop(_ingameSound - 1); + _mixer->stopAll(); if (_soundData) free(_soundData); } @@ -102,7 +102,7 @@ void SkySound::playSound(uint16 sound, uint16 volume) { if (dataSize == dataLoop) flags |= SoundMixer::FLAG_LOOP; - if (_ingameSound) _mixer->stop(_ingameSound - 1); + _mixer->stopAll(); _mixer->setVolume(volume); _mixer->playRaw(&_ingameSound, _soundData + dataOfs, dataSize, sampleRate, flags); } |