aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo/sound.cpp')
-rw-r--r--engines/hugo/sound.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index e5f55afcc8..d3c8fa0238 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -239,7 +239,7 @@ void MidiPlayer::timerCallback(void *p) {
player->updateTimer();
}
-SoundHandler::SoundHandler(HugoEngine &vm) : _vm(vm) {
+SoundHandler::SoundHandler(HugoEngine *vm) : _vm(vm) {
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
MidiDriver *driver = MidiDriver::createMidi(dev);
@@ -254,7 +254,7 @@ void SoundHandler::setMusicVolume() {
void SoundHandler::stopSound() {
/* Stop any sound that might be playing */
- _vm._mixer->stopAll();
+ _vm->_mixer->stopAll();
}
void SoundHandler::stopMusic() {
@@ -285,8 +285,8 @@ void SoundHandler::playMusic(int16 tune) {
uint16 size; // Size of sequence data
if (_config.musicFl) {
- _vm.getGameStatus().song = tune;
- seqPtr = _vm.file().getSound(tune, &size);
+ _vm->getGameStatus().song = tune;
+ seqPtr = _vm->_file->getSound(tune, &size);
playMIDI(seqPtr, size);
}
}
@@ -302,7 +302,7 @@ void SoundHandler::playSound(int16 sound, stereo_t channel, byte priority) {
static byte curPriority = 0; // Priority of currently playing sound
//
/* Sound disabled */
- if (!_config.soundFl || !_vm._mixer->isReady())
+ if (!_config.soundFl || !_vm->_mixer->isReady())
return;
//
// // See if last wave still playing - if so, check priority
@@ -314,11 +314,11 @@ void SoundHandler::playSound(int16 sound, stereo_t channel, byte priority) {
curPriority = priority;
//
/* Get sound data */
- if ((sound_p = _vm.file().getSound(sound, &size)) == 0)
+ if ((sound_p = _vm->_file->getSound(sound, &size)) == 0)
return;
Audio::AudioStream *stream = Audio::makeRawStream(sound_p, size, 11025, Audio::FLAG_UNSIGNED);
- _vm._mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, stream);
+ _vm->_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, stream);
}