25 byte flag,
unsigned freq_num,
unsigned freq_denom,
28 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPM_1(
30 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPM_2(
32 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPP_2(
34 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPL3_1(
36 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPL3_2(
38 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPL4_1(
40 [[nodiscard]]
static std::unique_ptr<EmuTimer>
createOPL4_2(
44 void setStart(
bool start, EmuTime::param time);
46 template<
typename Archive>
47 void serialize(Archive& ar,
unsigned version);
50 void executeUntil(EmuTime::param time)
override;
51 void schedule(EmuTime::param time);
60 bool counting =
false;
Represents a clock with a variable frequency.
~EmuTimerCallback()=default
virtual void callback(byte value)=0
static std::unique_ptr< EmuTimer > createOPM_1(Scheduler &scheduler, EmuTimerCallback &cb)
static std::unique_ptr< EmuTimer > createOPP_2(Scheduler &scheduler, EmuTimerCallback &cb)
static std::unique_ptr< EmuTimer > createOPM_2(Scheduler &scheduler, EmuTimerCallback &cb)
void setStart(bool start, EmuTime::param time)
static std::unique_ptr< EmuTimer > createOPL4_1(Scheduler &scheduler, EmuTimerCallback &cb)
static std::unique_ptr< EmuTimer > createOPL3_1(Scheduler &scheduler, EmuTimerCallback &cb)
void serialize(Archive &ar, unsigned version)
static std::unique_ptr< EmuTimer > createOPL3_2(Scheduler &scheduler, EmuTimerCallback &cb)
static std::unique_ptr< EmuTimer > createOPL4_2(Scheduler &scheduler, EmuTimerCallback &cb)
Every class that wants to get scheduled at some point must inherit from this class.
This file implemented 3 utility functions: