diff options
author | Max Horn | 2011-03-25 17:01:36 +0100 |
---|---|---|
committer | Max Horn | 2011-03-25 17:01:36 +0100 |
commit | 6cc0aca5b23cc63c51e8b0fb3f708854c0431d58 (patch) | |
tree | adeeae2f79af07e92a486924abd7f59f386c89af /audio/midiplayer.h | |
parent | 9e65daef3bed3218d6a593f58b1c9a04c0d09f0a (diff) | |
download | scummvm-rg350-6cc0aca5b23cc63c51e8b0fb3f708854c0431d58.tar.gz scummvm-rg350-6cc0aca5b23cc63c51e8b0fb3f708854c0431d58.tar.bz2 scummvm-rg350-6cc0aca5b23cc63c51e8b0fb3f708854c0431d58.zip |
AUDIO: Document issues with semantics of Audio::MidiPlayer::isPlaying()
Diffstat (limited to 'audio/midiplayer.h')
-rw-r--r-- | audio/midiplayer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/audio/midiplayer.h b/audio/midiplayer.h index 1bb7942343..fe96e0d5e2 100644 --- a/audio/midiplayer.h +++ b/audio/midiplayer.h @@ -69,6 +69,24 @@ public: virtual void pause(); virtual void resume(); + /** + * Return whether there is currently any MIDI music playing. + * + * @todo There is a subtle difference between the semantics of this in + * various subclasses, related to paused music: Namely, should this + * function return true or false if a MIDI song is currently loaded, + * but paused? In the base implementation of pause/resume, "false" + * will be returned (that is, it is not possible to distinguish between + * nothing being played, and an active but paused MIDI tune). + * But in several subclasses (e.g. in HUGO), there is a separate _paused + * variable, which is used to pause playback, and for these, "true" + * will be returned. + * And in SAGA, isPlaying is overwritten to return the value + * of _parser->isPlaying() (which should amount to "true" in the + * described situation). + * We really should unify this and clearly define the desired + * semantics of this method. + */ bool isPlaying() const { return _isPlaying; } /** |