aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorScott Thomas2011-04-20 23:33:55 +0930
committerScott Thomas2011-04-20 23:40:03 +0930
commitaccb0c2a5d0c9e7b353cda4b74f511a498ed8073 (patch)
treedd454427c0d7fe88d904dc60b897336050a1837a /engines
parentdaede376e1a7878e8b5b87350c2296c324b6d3bc (diff)
downloadscummvm-rg350-accb0c2a5d0c9e7b353cda4b74f511a498ed8073.tar.gz
scummvm-rg350-accb0c2a5d0c9e7b353cda4b74f511a498ed8073.tar.bz2
scummvm-rg350-accb0c2a5d0c9e7b353cda4b74f511a498ed8073.zip
GROOVIE: Add timer for MusicPlayerMPEG4 (required for music fade in/out)
Diffstat (limited to 'engines')
-rw-r--r--engines/groovie/music.cpp5
-rw-r--r--engines/groovie/music.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index 03e17d567f..b6ef5d277c 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -770,6 +770,11 @@ Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadS
}
MusicPlayerMPEG4::MusicPlayerMPEG4(GroovieEngine *vm) : MusicPlayer(vm) {
+ vm->getTimerManager()->installTimerProc(&onTimer, 50 * 1000, this);
+}
+
+MusicPlayerMPEG4::~MusicPlayerMPEG4() {
+ _vm->getTimerManager()->removeTimerProc(&onTimer);
}
void MusicPlayerMPEG4::updateVolume() {
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index cdf67cab44..107e52a67c 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -169,6 +169,7 @@ private:
class MusicPlayerMPEG4 : public MusicPlayer {
public:
MusicPlayerMPEG4(GroovieEngine *vm);
+ ~MusicPlayerMPEG4();
protected:
void updateVolume();