Store entire time info in context; More ImGui/Ildaeil fixups
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
a6a4745186
commit
af80d41aef
5 changed files with 68 additions and 30 deletions
|
|
@ -818,6 +818,8 @@ protected:
|
|||
{
|
||||
const TimePosition& timePos(getTimePosition());
|
||||
context->playing = timePos.playing;
|
||||
context->bbtValid = timePos.bbt.valid;
|
||||
context->frame = timePos.frame;
|
||||
|
||||
if (timePos.bbt.valid)
|
||||
{
|
||||
|
|
@ -827,6 +829,9 @@ protected:
|
|||
context->bar = timePos.bbt.bar;
|
||||
context->beat = timePos.bbt.beat;
|
||||
context->beatsPerBar = timePos.bbt.beatsPerBar;
|
||||
context->beatType = timePos.bbt.beatType;
|
||||
context->barStartTick = timePos.bbt.barStartTick;
|
||||
context->beatsPerMinute = timePos.bbt.beatsPerMinute;
|
||||
context->tick = timePos.bbt.tick;
|
||||
context->ticksPerBeat = timePos.bbt.ticksPerBeat;
|
||||
context->ticksPerClock = timePos.bbt.ticksPerBeat / timePos.bbt.beatType;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,10 @@ struct CardinalPluginContext : rack::Context {
|
|||
uint32_t bufferSize;
|
||||
double sampleRate;
|
||||
float parameters[kModuleParameters];
|
||||
bool playing, reset;
|
||||
int32_t bar, beat, beatsPerBar;
|
||||
bool playing, reset, bbtValid;
|
||||
int32_t bar, beat, beatsPerBar, beatType;
|
||||
uint64_t frame;
|
||||
double barStartTick, beatsPerMinute;
|
||||
double tick, tickClock, ticksPerBeat, ticksPerClock, ticksPerFrame;
|
||||
uintptr_t nativeWindowId;
|
||||
Plugin* const plugin;
|
||||
|
|
@ -51,9 +53,14 @@ struct CardinalPluginContext : rack::Context {
|
|||
sampleRate(p->getSampleRate()),
|
||||
playing(false),
|
||||
reset(false),
|
||||
bar(0),
|
||||
beat(0),
|
||||
beatsPerBar(0),
|
||||
bbtValid(false),
|
||||
bar(1),
|
||||
beat(1),
|
||||
beatsPerBar(4),
|
||||
beatType(4),
|
||||
frame(0),
|
||||
barStartTick(0.0),
|
||||
beatsPerMinute(120.0),
|
||||
tick(0.0),
|
||||
tickClock(0.0),
|
||||
ticksPerBeat(0.0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue