mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 05:05:43 +01:00
use DoubleableBeats in VST3 to provide plugin API required doubles for beat time
This commit is contained in:
parent
3eac6ac7dc
commit
7dc3db49eb
1 changed files with 3 additions and 6 deletions
|
|
@ -641,8 +641,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
|||
context.tempo = metric.tempo().quarter_notes_per_minute ();
|
||||
context.timeSigNumerator = metric.meter().divisions_per_bar ();
|
||||
context.timeSigDenominator = metric.meter().note_value ();
|
||||
#warning NUTEMPO need better conversion to double from Beats here
|
||||
context.projectTimeMusic = 0; // metric.tempo().quarters_at_sample (start);
|
||||
context.projectTimeMusic = DoubleableBeats (metric.tempo().quarters_at_sample (start)).to_double();
|
||||
context.barPositionMusic = bbt.bars * 4; // PPQN, NOT tmap.metric_at(bbt).meter().divisions_per_bar()
|
||||
}
|
||||
|
||||
|
|
@ -661,10 +660,8 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
|||
/* loop start/end in quarter notes */
|
||||
|
||||
TempoMap::SharedPtr tmap (TempoMap::use());
|
||||
#warning NUTEMPO need better conversion to double from Beats here
|
||||
context.cycleStartMusic = 0; // tmap->metric_at (looploc->start()).quarters_at (looploc->start ());
|
||||
#warning NUTEMPO need better conversion to double from Beats here
|
||||
context.cycleEndMusic = 0; // tmap->metric_at (looploc->end()).quarters_at (looploc->end ());
|
||||
context.cycleStartMusic = DoubleableBeats (tmap->metric_at (looploc->start()).quarters_at (looploc->start ())).to_double ();
|
||||
context.cycleEndMusic = DoubleableBeats (tmap->metric_at (looploc->end()).quarters_at (looploc->end ())).to_double ();
|
||||
context.state |= Vst::ProcessContext::kCycleValid;
|
||||
context.state |= Vst::ProcessContext::kCycleActive;
|
||||
} catch (...) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue