AU tempo API updates
This commit is contained in:
parent
b9f70334b6
commit
46709de8ab
@ -1760,9 +1760,8 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat,
|
|||||||
return kAudioUnitErr_CannotDoInCurrentContext;
|
return kAudioUnitErr_CannotDoInCurrentContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
Timecode::BBT_Time bbt;
|
|
||||||
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
|
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
|
||||||
tmap.bbt_time (_session.transport_frame() + input_offset, bbt);
|
Timecode::BBT_Time bbt = _session.tempo_map().bbt_at_frame (_session.transport_frame() + input_offset);
|
||||||
|
|
||||||
if (outCurrentBeat) {
|
if (outCurrentBeat) {
|
||||||
const double ppq_scaling = metric.meter().note_divisor() / 4.0;
|
const double ppq_scaling = metric.meter().note_divisor() / 4.0;
|
||||||
@ -1800,9 +1799,8 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe
|
|||||||
return kAudioUnitErr_CannotDoInCurrentContext;
|
return kAudioUnitErr_CannotDoInCurrentContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
Timecode::BBT_Time bbt;
|
|
||||||
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
|
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
|
||||||
tmap.bbt_time (_session.transport_frame() + input_offset, bbt);
|
Timecode::BBT_Time bbt = _session.tempo_map().bbt_at_frame (_session.transport_frame() + input_offset);
|
||||||
|
|
||||||
if (outDeltaSampleOffsetToNextBeat) {
|
if (outDeltaSampleOffsetToNextBeat) {
|
||||||
if (bbt.ticks == 0) {
|
if (bbt.ticks == 0) {
|
||||||
@ -1896,7 +1894,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying,
|
|||||||
|
|
||||||
if (outCycleStartBeat) {
|
if (outCycleStartBeat) {
|
||||||
TempoMetric metric = tmap.metric_at (loc->start() + input_offset);
|
TempoMetric metric = tmap.metric_at (loc->start() + input_offset);
|
||||||
_session.tempo_map().bbt_time (loc->start(), bbt);
|
bbt = _session.tempo_map().bbt_at_frame (loc->start() + input_offset);
|
||||||
|
|
||||||
float beat;
|
float beat;
|
||||||
beat = metric.meter().divisions_per_bar() * bbt.bars;
|
beat = metric.meter().divisions_per_bar() * bbt.bars;
|
||||||
@ -1908,7 +1906,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying,
|
|||||||
|
|
||||||
if (outCycleEndBeat) {
|
if (outCycleEndBeat) {
|
||||||
TempoMetric metric = tmap.metric_at (loc->end() + input_offset);
|
TempoMetric metric = tmap.metric_at (loc->end() + input_offset);
|
||||||
_session.tempo_map().bbt_time (loc->end(), bbt);
|
bbt = _session.tempo_map().bbt_at_frame (loc->end() + input_offset);
|
||||||
|
|
||||||
float beat;
|
float beat;
|
||||||
beat = metric.meter().divisions_per_bar() * bbt.bars;
|
beat = metric.meter().divisions_per_bar() * bbt.bars;
|
||||||
|
Loading…
Reference in New Issue
Block a user