check if _imuse is initialized

svn-id: r5331
This commit is contained in:
Paweł Kołodziejski 2002-10-27 10:02:11 +00:00
parent 390ce3dada
commit 8697f942ec
2 changed files with 11 additions and 4 deletions

View File

@ -596,8 +596,11 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
_scumm->_sound->_sound_volume_music = _soundVolumeMusic; // Music
_scumm->_sound->_sound_volume_sfx = _soundVolumeSfx; // SFX
_scumm->_imuse->set_music_volume(_soundVolumeMusic);
_scumm->_imuse->set_master_volume(_soundVolumeMaster);
if (_scumm->_imuse) {
_scumm->_imuse->set_music_volume(_soundVolumeMusic);
_scumm->_imuse->set_master_volume(_soundVolumeMaster);
}
_scumm->_mixer->setVolume(_soundVolumeSfx);
_scumm->_mixer->setMusicVolume(_soundVolumeMusic);

View File

@ -1060,12 +1060,16 @@ void Scumm::processKbd()
_sound->_sound_volume_master-=5;
if (_sound->_sound_volume_master < 0)
_sound->_sound_volume_master = 0;
_imuse->set_master_volume(_sound->_sound_volume_master);
if (_imuse) {
_imuse->set_master_volume(_sound->_sound_volume_master);
}
} else if (_lastKeyHit == ']') { // ] volume down
_sound->_sound_volume_master+=5;
if (_sound->_sound_volume_master > 128)
_sound->_sound_volume_master = 128;
_imuse->set_master_volume(_sound->_sound_volume_master);
if (_imuse) {
_imuse->set_master_volume(_sound->_sound_volume_master);
}
} else if (_lastKeyHit == '-') { // - text speed down
_defaultTalkDelay+=5;
if (_defaultTalkDelay > 90)