mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
AUDIO: Document issues with semantics of Audio::MidiPlayer::isPlaying()
This commit is contained in:
parent
9e65daef3b
commit
6cc0aca5b2
@ -174,8 +174,8 @@ void MidiPlayer::stop() {
|
||||
|
||||
void MidiPlayer::pause() {
|
||||
// debugC(2, kDraciSoundDebugLevel, "Pausing track %d", _track);
|
||||
setVolume(-1); // FIXME: This should be 0, shouldn't it?
|
||||
_isPlaying = false;
|
||||
setVolume(-1); // FIXME: This should be 0, shouldn't it?
|
||||
}
|
||||
|
||||
void MidiPlayer::resume() {
|
||||
|
@ -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; }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user