Hi,
One of my custom plugin requires to be fed with tempo/signature/position, but it seems I can’t just use the TempoSequence
(from the Edit
) since this code could trigger an async update :
tempo::BarsAndBeats TempoSequence::toBarsAndBeats (TimePosition t) const
{
updateTempoDataIfNeeded();
return internalSequence.toBarsAndBeats (t);
}
and :
void TempoSequence::updateTempoDataIfNeeded() const
{
// The check on isUpdatePending is to avoid triggering a message thread assert
// if this is called on a background thread when no update is needed
if (tempos->isUpdatePending())
tempos->handleUpdateNowIfNeeded();
if (timeSigs->isUpdatePending())
timeSigs->handleUpdateNowIfNeeded();
}
I can’t call the isUpdatePending()
methods myself since tempos
and timeSigs
aren’t public.
So… How I can retrieve tempo/signature/positions safely from the audio context ?
Thank you !
E.