diff options
author | Matthew Hoops | 2011-11-02 20:39:06 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-11-02 20:39:06 -0400 |
commit | 476f4b513dd7d69a4d31b464dbc2981a353671c4 (patch) | |
tree | da9befcd1172ef562fd7d180c629b5f07450e558 | |
parent | 8b62693c82a38d01a80f764e13a1bb1e6177bccb (diff) | |
download | scummvm-rg350-476f4b513dd7d69a4d31b464dbc2981a353671c4.tar.gz scummvm-rg350-476f4b513dd7d69a4d31b464dbc2981a353671c4.tar.bz2 scummvm-rg350-476f4b513dd7d69a4d31b464dbc2981a353671c4.zip |
PEGASUS: Switch spot sounds to using SoundTimeBase
Spot sound requests no longer freeze the game in some way
-rw-r--r-- | engines/pegasus/neighborhood/neighborhood.cpp | 11 | ||||
-rw-r--r-- | engines/pegasus/neighborhood/neighborhood.h | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp index 00abb02624..ae7f80d2ce 100644 --- a/engines/pegasus/neighborhood/neighborhood.cpp +++ b/engines/pegasus/neighborhood/neighborhood.cpp @@ -91,9 +91,7 @@ void Neighborhood::init() { _navMovieCallBack.setNotification(&_neighborhoodNotification); _turnPushCallBack.setNotification(&_neighborhoodNotification); _delayCallBack.setNotification(&_neighborhoodNotification); - - // TODO - //_spotSoundCallBack.setNotification(&_neighborhoodNotification); + _spotSoundCallBack.setNotification(&_neighborhoodNotification); debug(0, "Loading '%s' neighborhood resources", _resName.c_str()); @@ -172,9 +170,7 @@ void Neighborhood::init() { _stridingCallBack.initCallBack(&_navMovie, kCallBackAtTime); _turnPushCallBack.initCallBack(&_turnPush, kCallBackAtExtremes); _delayCallBack.initCallBack(&_delayTimer, kCallBackAtExtremes); - - // TODO - //_spotSoundCallBack.initCallBack(&_spotSounds, kCallBackAtExtremes); + _spotSoundCallBack.initCallBack(&_spotSounds, kCallBackAtExtremes); setUpAIRules(); @@ -426,7 +422,8 @@ void Neighborhood::serviceActionQueue() { _spotSounds.stopSound(); _spotSounds.playSoundSegment(topRequest.start, topRequest.stop); _interruptionFilter = topRequest.interruptionFilter; - // TODO: stop trigger + _spotSoundCallBack.setCallBackFlag(topRequest.flags); + _spotSoundCallBack.scheduleCallBack(kTriggerAtStop, 0, 0); break; case kDelayRequest: _delayTimer.stop(); diff --git a/engines/pegasus/neighborhood/neighborhood.h b/engines/pegasus/neighborhood/neighborhood.h index e95f76cb26..c11fe78e59 100644 --- a/engines/pegasus/neighborhood/neighborhood.h +++ b/engines/pegasus/neighborhood/neighborhood.h @@ -372,7 +372,7 @@ protected: HotspotList _neighborhoodHotspots; // Sounds - Sound _spotSounds; + SoundTimeBase _spotSounds; // Action queue NeighborhoodActionQueue _actionQueue; |