diff options
author | Jamieson Christian | 2003-09-28 00:03:24 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-09-28 00:03:24 +0000 |
commit | 044bcd5430a9ba1b19e10d4d4e3a193358166991 (patch) | |
tree | 3af39ea65d71f9de3deedb3c116d782fa97b9b8d /scumm/imuse.cpp | |
parent | 1d40ce68c2fd93abdef86989ae534b124f175068 (diff) | |
download | scummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.tar.gz scummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.tar.bz2 scummvm-rg350-044bcd5430a9ba1b19e10d4d4e3a193358166991.zip |
Added terminate() to the MusicEngine and publicized
the iMuse implementation. This allows the termination
sequence to be done BEFORE object destruction, so
that the destructor is not making calls that may not
be appropriate during object destruction. (Virtual
functions were the concern, although I'm not sure any
of that was happening anyway. Oh well, better to be
safe than sorry.)
I implemented an empty terminate() in the base class,
but the other MusicEngine derivatives may have stuff
in their destructors that should be moved to this
method. I didn't check.
svn-id: r10452
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r-- | scumm/imuse.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index 30ca18ba98..9076cec2d4 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -69,10 +69,6 @@ _snm_trigger_index(0) memset(_active_notes,0,sizeof(_active_notes)); } -IMuseInternal::~IMuseInternal() { - terminate(); -} - byte *IMuseInternal::findStartOfSound(int sound) { byte *ptr = NULL; int32 size, pos; @@ -1783,6 +1779,7 @@ int32 IMuse::doCommand (int numargs, int args[]) { in(); int32 ret = _target->do int IMuse::clear_queue() { in(); int ret = _target->clear_queue(); out(); return ret; } void IMuse::setBase(byte **base) { in(); _target->setBase(base); out(); } uint32 IMuse::property(int prop, uint32 value) { in(); uint32 ret = _target->property(prop, value); out(); return ret; } +void IMuse::terminate() { in(); _target->terminate(); out(); } // The IMuse::create method provides a front-end factory // for creating IMuseInternal without exposing that class |