resonance 1.0.1
Loading...
Searching...
No Matches
multimuseplayer.h
Go to the documentation of this file.
1#pragma once
2
3#include "gs/multimuse.h"
4#include "gs/museplayer.h"
5#include "gs/musesynth.h"
6#include "mid/tickobj.h"
7#include "sch/sequencer.h"
8
27class MultiMusePlayer : public MuseSynth, public MusePlayer {
28public:
29 // Both bases declare an allocation pair. The destructor's release branch bills the block to
30 // the tagged heap, which is MsgSink's operator rather than MusePlayer's untagged one.
31 using MsgSink::operator delete;
32 using MsgSink::operator new;
33
42
48
53 virtual void Start(MsgSink *pSink);
54
59 virtual void Stop();
60
68 virtual int DisplacesSiblings();
69
74 virtual void RetainOnly(MusePlayer *pPlayer);
75
80 virtual void PlayerFinished(MusePlayer *pPlayer);
81
82private:
83 MultiMuse *mMuse; // +0x38 retained on construction and released by the destructor
84 MuseParent *mParent; // +0x3c
85 // The clock the schedule is posted against, the same value MuseSynth stores.
86 Sch::TickClock *mClock; // +0x40
87 // The sequencer that walks mMuse, created by Start() and withdrawn by Stop(). The constructor
88 // does not initialise it.
89 Sequencer<const TickObj<MuseMsg *> *> *mSequencer; // +0x44
90 // Whether RetainOnly() has already been reported to mParent. It is set once and never cleared.
91 int mParentToldToRetain; // +0x48
92 // Whether the player is running. Start() sets it, Stop() and PlayerFinished() clear it.
93 int mRunning; // +0x4c
94};
Receiver of engine messages.
Definition msgsink.h:37
virtual void Stop()
MultiMusePlayer(MultiMuse *pMuse, MuseParent *pParent, Sch::TickClock *pClock)
virtual void PlayerFinished(MusePlayer *pPlayer)
virtual ~MultiMusePlayer()
virtual void Start(MsgSink *pSink)
virtual int DisplacesSiblings()
MusePlayer table slot 4.
virtual void RetainOnly(MusePlayer *pPlayer)
Sequence of messages, each at a song position.
Definition multimuse.h:30
Owner a MusePlayer reports back to.
Definition museparent.h:18
MusePlayer()
Construct a player with the next serial number.
MuseSynth(Sch::TickClock *pClock)
Pausable view of scheduler time, together with the tempo that maps it to a song position.
Definition tickclock.h:40
Dispatcher of one range of timed messages against a clock.
Definition sequencer.h:29