diff options
author | Filippos Karapetis | 2016-09-26 22:58:32 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 00:34:14 +0300 |
commit | 93a83a6b86116dabc058c4d799615d7e6c496a0c (patch) | |
tree | 44bace74fcc1a94bab2986c16954466906809995 /engines/chewy/sound.cpp | |
parent | 8767b44fe0e216145e6f4218966b604e158f912e (diff) | |
download | scummvm-rg350-93a83a6b86116dabc058c4d799615d7e6c496a0c.tar.gz scummvm-rg350-93a83a6b86116dabc058c4d799615d7e6c496a0c.tar.bz2 scummvm-rg350-93a83a6b86116dabc058c4d799615d7e6c496a0c.zip |
CHEWY: Add an event manager, and get rid of g_engine
Diffstat (limited to 'engines/chewy/sound.cpp')
-rw-r--r-- | engines/chewy/sound.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp index 9ef4df97d9..fc27f637d4 100644 --- a/engines/chewy/sound.cpp +++ b/engines/chewy/sound.cpp @@ -30,7 +30,8 @@ namespace Chewy { -Sound::Sound() { +Sound::Sound(Audio::Mixer *mixer) { + _mixer = mixer; _speechRes = new SoundResource("speech.tvp"); _soundRes = new SoundResource("details.tap"); } @@ -51,7 +52,7 @@ void Sound::playSound(int num, bool loop) { DisposeAfterUse::NO), loop ? 0 : 1); - g_engine->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); delete[] sound->data; delete sound; @@ -72,7 +73,7 @@ void Sound::playMusic(int num, bool loop) { DisposeAfterUse::NO), loop ? 0 : 1); - g_engine->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream); } void Sound::playSpeech(int num) { @@ -86,7 +87,7 @@ void Sound::playSpeech(int num) { DisposeAfterUse::NO), 1); - g_engine->_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream); delete[] sound->data; delete sound; |