vector<pair<int,int> >& io_configs = pinfo->cache.io_configs;
- DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 has %2 IO configurations\n", name(), io_configs.size()));
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 has %2 IO configurations, looking for %3 in, %4 out\n",
+ name(), io_configs.size(), in, out));
//Ardour expects the plugin to tell it the output
//configuration but AU plugins can have multiple I/O
int32_t possible_out = i->second;
if ((possible_in == audio_in) && (possible_out == audio_out)) {
- DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("\tCHOSEN: in %1 out %2\n", in, out));
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("\tCHOSEN: %1 in %2 out to match in %3 out %4\n",
+ possible_in, possible_out,
+ in, out));
+
+ out.set (DataType::MIDI, 0);
+ out.set (DataType::AUDIO, audio_out);
+
return 1;
}
}
_last_nframes = nframes;
}
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 in %2 out %3 MIDI %4 bufs %5 (available %6)\n",
+ name(), input_channels, output_channels, _has_midi_input,
+ bufs.count(), bufs.available()));
+
/* the apparent number of buffers matches our input configuration, but we know that the bufferset
has the capacity to handle our outputs.
*/
+
assert (bufs.available() >= ChanCount (DataType::AUDIO, output_channels));
input_buffers = &bufs;
input_offset = offset;
cb_offset = 0;
- DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1 in %2 out %3 MIDI %4 bufs %5 (available %6)\n",
- name(), input_channels, output_channels, _has_midi_input,
- bufs.count(), bufs.available()));
-
buffers->mNumberBuffers = output_channels;
for (int32_t i = 0; i < output_channels; ++i) {
Timecode::BBT_Time bbt;
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
- tmap.bbt_time_with_metric (_session.transport_frame() + input_offset, bbt, metric);
+ tmap.bbt_time (_session.transport_frame() + input_offset, bbt);
if (outCurrentBeat) {
float beat;
beat = metric.meter().divisions_per_bar() * bbt.bars;
beat += bbt.beats;
- beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
+ beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
*outCurrentBeat = beat;
}
Timecode::BBT_Time bbt;
TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset);
- tmap.bbt_time_with_metric (_session.transport_frame() + input_offset, bbt, metric);
+ tmap.bbt_time (_session.transport_frame() + input_offset, bbt);
if (outDeltaSampleOffsetToNextBeat) {
if (bbt.ticks == 0) {
*outDeltaSampleOffsetToNextBeat = 0;
} else {
*outDeltaSampleOffsetToNextBeat = (UInt32)
- floor (((Timecode::BBT_Time::ticks_per_bar_division - bbt.ticks)/Timecode::BBT_Time::ticks_per_bar_division) * // fraction of a beat to next beat
- metric.tempo().frames_per_beat(_session.frame_rate())); // frames per beat
+ floor (((Timecode::BBT_Time::ticks_per_beat - bbt.ticks)/Timecode::BBT_Time::ticks_per_beat) * // fraction of a beat to next beat
+ metric.tempo().frames_per_beat (_session.frame_rate())); // frames per beat
}
}
if (outCycleStartBeat) {
TempoMetric metric = tmap.metric_at (loc->start() + input_offset);
- _session.tempo_map().bbt_time_with_metric (loc->start(), bbt, metric);
+ _session.tempo_map().bbt_time (loc->start(), bbt);
float beat;
beat = metric.meter().divisions_per_bar() * bbt.bars;
beat += bbt.beats;
- beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
+ beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
*outCycleStartBeat = beat;
}
if (outCycleEndBeat) {
TempoMetric metric = tmap.metric_at (loc->end() + input_offset);
- _session.tempo_map().bbt_time_with_metric (loc->end(), bbt, metric);
+ _session.tempo_map().bbt_time (loc->end(), bbt);
float beat;
beat = metric.meter().divisions_per_bar() * bbt.bars;
beat += bbt.beats;
- beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;
+ beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
*outCycleEndBeat = beat;
}