aboutsummaryrefslogtreecommitdiff
path: root/engines/access/access.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access/access.cpp')
-rw-r--r--engines/access/access.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 080a8ef975..7f59ae7ad6 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -222,14 +222,14 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) {
_events->clearEvents();
while (!shouldQuit()) {
_sound->freeSounds();
- Resource *sound = _sound->loadSound(_narateFile + 99, _sndSubFile);
- _sound->_soundTable.push_back(SoundEntry(sound, 1));
+ _sound->loadSoundTable(0, _narateFile + 99, _sndSubFile);
_sound->playSound(0);
- _scripts->cmdFreeSound();
while(_sound->isSFXPlaying() && !shouldQuit())
_events->pollEvents();
+ _scripts->cmdFreeSound();
+
if (_events->isKeyMousePressed()) {
_sndSubFile += soundsLeft;
break;
@@ -257,11 +257,12 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) {
Resource *res = _sound->loadSound(_narateFile + 99, _sndSubFile);
_sound->_soundTable.push_back(SoundEntry(res, 1));
_sound->playSound(0);
- _scripts->cmdFreeSound();
while(_sound->isSFXPlaying() && !shouldQuit())
_events->pollEvents();
+ _scripts->cmdFreeSound();
+
if (_events->_leftButton) {
_events->debounceLeft();
_sndSubFile += soundsLeft;