aboutsummaryrefslogtreecommitdiff
path: root/engines/wage
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-29 09:29:53 +0200
committerEugene Sandulenko2017-08-29 09:33:44 +0200
commit58fb345b3e56feb6f05bee0385e115f47bc00b81 (patch)
treec2e2526f697aabf66fba5e172a07901d909d16b7 /engines/wage
parentd0082982d52a98674cafca08a0822375c37a3d83 (diff)
downloadscummvm-rg350-58fb345b3e56feb6f05bee0385e115f47bc00b81.tar.gz
scummvm-rg350-58fb345b3e56feb6f05bee0385e115f47bc00b81.tar.bz2
scummvm-rg350-58fb345b3e56feb6f05bee0385e115f47bc00b81.zip
WAGE: Since the sounds are blocking, made the sound handle global
Diffstat (limited to 'engines/wage')
-rw-r--r--engines/wage/sound.cpp4
-rw-r--r--engines/wage/sound.h4
-rw-r--r--engines/wage/wage.h3
3 files changed, 5 insertions, 6 deletions
diff --git a/engines/wage/sound.cpp b/engines/wage/sound.cpp
index 36490695e1..9f5ed3497c 100644
--- a/engines/wage/sound.cpp
+++ b/engines/wage/sound.cpp
@@ -92,10 +92,10 @@ void WageEngine::playSound(Common::String soundName) {
Audio::AudioStream *stream = Audio::makeRawStream(s->_data, s->_size, 11000, Audio::FLAG_UNSIGNED);
- _mixer->playStream(Audio::Mixer::kPlainSoundType, &s->_handle, stream,
+ _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, stream,
-1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
- while (_mixer->isSoundHandleActive(s->_handle) && !_shouldQuit) {
+ while (_mixer->isSoundHandleActive(_soundHandle) && !_shouldQuit) {
Common::Event event;
_eventMan->pollEvent(event);
diff --git a/engines/wage/sound.h b/engines/wage/sound.h
index 101b5a0db6..ada5a3c0cb 100644
--- a/engines/wage/sound.h
+++ b/engines/wage/sound.h
@@ -48,8 +48,6 @@
#ifndef WAGE_SOUND_H
#define WAGE_SOUND_H
-#include "audio/mixer.h"
-
namespace Wage {
class Sound {
@@ -60,8 +58,6 @@ public:
Common::String _name;
uint _size;
byte *_data;
-
- Audio::SoundHandle _handle;
};
} // End of namespace Wage
diff --git a/engines/wage/wage.h b/engines/wage/wage.h
index 4c93399ad7..d2c97adfa0 100644
--- a/engines/wage/wage.h
+++ b/engines/wage/wage.h
@@ -49,6 +49,7 @@
#define WAGE_WAGE_H
#include "engines/engine.h"
+#include "audio/mixer.h"
#include "common/debug.h"
#include "common/endian.h"
#include "common/rect.h"
@@ -234,6 +235,8 @@ private:
Common::MacResManager *_resManager;
bool _shouldQuit;
+
+ Audio::SoundHandle _soundHandle;
};
// Example console class