#include <ardour/io.h>
#include <ardour/audio_unit.h>
#include <ardour/session.h>
+#include <ardour/tempo.h>
#include <ardour/utils.h>
#include <appleutility/CAAudioUnit.h>
}
BBT_Time bbt;
- Metric metric;
-
+ TempoMap::Metric metric = tmap.metric_at (_session.transport_frame() + current_offset);
tmap.bbt_time_with_metric (_session.transport_frame() + current_offset, bbt, metric);
if (outCurrentBeat) {
float beat;
- beat = metric.meter().beats_per_bar * bbt.bars;
+ beat = metric.meter().beats_per_bar() * bbt.bars;
beat += bbt.beats;
beat += bbt.ticks / Meter::ticks_per_beat;
- *outCurrentBeat = *beat;
+ *outCurrentBeat = beat;
}
if (outCurrentTempo) {
}
BBT_Time bbt;
- Metric metric;
-
+ TempoMap::Metric metric = tmap.metric_at (_session.transport_frame() + current_offset);
tmap.bbt_time_with_metric (_session.transport_frame() + current_offset, bbt, metric);
if (*outDeltaSampleOffsetToNextBeat) {
etc.
*/
- *outCurrentMeasureDownBeat = 1 + metric.meter().beats_per_bar * (bbt.bars - 1);
+ *outCurrentMeasureDownBeat = 1 + metric.meter().beats_per_bar() * (bbt.bars - 1);
}
return noErr;
}
BBT_Time bbt;
- TempoMap::Metric metric;
if (outCycleStartBeat) {
- TempoMap::Metric metric;
- _session.tempo_map().bbt_time (loc->start(), bbt, metric);
-
-
+ TempoMap::Metric metric = tmap.metric_at (loc->start() + current_offset);
+ _session.tempo_map().bbt_time_with_metric (loc->start(), bbt, metric);
+
float beat;
- beat = metric.meter().beats_per_bar * bbt.bars;
+ beat = metric.meter().beats_per_bar() * bbt.bars;
beat += bbt.beats;
beat += bbt.ticks / Meter::ticks_per_beat;
}
if (outCycleEndBeat) {
- _session.tempo_map().bbt_time (loc->start(), bbt, metric);
+ TempoMap::Metric metric = tmap.metric_at (loc->end() + current_offset);
+ _session.tempo_map().bbt_time_with_metric (loc->end(), bbt, metric);
float beat;
- beat = metric.meter().beats_per_bar * bbt.bars;
+ beat = metric.meter().beats_per_bar() * bbt.bars;
beat += bbt.beats;
beat += bbt.ticks / Meter::ticks_per_beat;
follow Apple "guidelines".
*/
- snprintf (buf, sizeof (buf), "%u", version);
+ snprintf (buf, sizeof (buf), "%u", (uint32_t) version);
id = unique_id;
id += '/';
id += buf;