Hi, maybe the title is not a good description of the problem, so sorry for This!
Problem actually is:
On a project if I insert a new tempo in a tempoSequence it is not updated immediately:
for example in my MainComponent constructor I wrote this:
MainComponent::MainComponent()
{
setSize (1000, 600);
edit.reset(new tracktion_engine::Edit{engine, tracktion_engine::createEmptyEdit(), tracktion_engine::Edit::forEditing, nullptr, 0});
edit->tempoSequence.getTempoAt(0).setBpm(120);
edit->tempoSequence.getTempoAt(0).setCurve(0.0);
edit->tempoSequence.insertTempo(4, 120, 0.0);
edit->tempoSequence.insertTempo(4, 300, 0.0);
edit->tempoSequence.insertTempo(8, 300, 0.0);
for (auto tempo : edit->tempoSequence.getTempos())
{
DBG(tempo->getStartTime());
}
}
It prints: 0 0 0 0 (It happens also if I put the cycle in resized() method for example). I noticed (putting cycle in a timerCallback) that those values are updated only after a while (printing correctly 0 2 2 2.8).
Why? Problem obviously rise because some of my classes needs to know “tempo->getStartTime()” values to do some stuff immediately when Program is launched.
Thank you in advice!