Fix reporting tempo and time-signature to VST plugins #9188
This commit is contained in:
parent
3ae7295142
commit
ebf7afc482
@ -189,12 +189,12 @@ intptr_t Session::vst_callback (
|
||||
timeinfo->sampleRate = session->sample_rate();
|
||||
|
||||
if (value & (kVstTempoValid)) {
|
||||
const Tempo& t (tmap->metric_at (now).tempo());
|
||||
const Tempo& t (tmap->metric_at (timepos_t (now)).tempo());
|
||||
timeinfo->tempo = t.quarter_notes_per_minute ();
|
||||
newflags |= (kVstTempoValid);
|
||||
}
|
||||
if (value & (kVstTimeSigValid)) {
|
||||
const Meter& ms (tmap->metric_at (now).meter());
|
||||
const Meter& ms (tmap->metric_at (timepos_t (now)).meter());
|
||||
timeinfo->timeSigNumerator = ms.divisions_per_bar ();
|
||||
timeinfo->timeSigDenominator = ms.note_value ();
|
||||
newflags |= (kVstTimeSigValid);
|
||||
|
@ -653,7 +653,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
||||
|
||||
{
|
||||
TempoMap::SharedPtr tmap (TempoMap::use());
|
||||
const TempoMetric& metric (tmap->metric_at (start));
|
||||
const TempoMetric& metric (tmap->metric_at (timepos_t (start)));
|
||||
const BBT_Time& bbt (metric.bbt_at (timepos_t (start)));
|
||||
|
||||
context.tempo = metric.tempo().quarter_notes_per_minute ();
|
||||
|
Loading…
Reference in New Issue
Block a user