/** A segment of region that needs to be read */
struct Segment {
Segment (boost::shared_ptr<AudioRegion> r, Evoral::Range<framepos_t> a) : region (r), range (a) {}
-
+
boost::shared_ptr<AudioRegion> region; ///< the region
Evoral::Range<framepos_t> range; ///< range of the region to read, in session frames
};
AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, framepos_t start,
framecnt_t cnt, unsigned chan_n)
{
- DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("Playlist %1 read @ %2 for %3, channel %4, regions %5\n",
- name(), start, cnt, chan_n, regions.size()));
+ DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("Playlist %1 read @ %2 for %3, channel %4, regions %5 mixdown @ %6 gain @ %7\n",
+ name(), start, cnt, chan_n, regions.size(), mixdown_buffer, gain_buffer));
/* optimizing this memset() away involves a lot of conditionals
that may well cause more of a hit due to cache misses
if (!string_is_affirmative (p->value())) {
continue;
}
-
+
if ((p = (*i)->property (X_("in"))) == 0) {
continue;
}
if (!in) {
warning << string_compose (_("Legacy crossfade involved an incoming region not present in playlist \"%1\" - crossfade discarded"),
- name())
+ name())
<< endmsg;
continue;
}
if (!out) {
warning << string_compose (_("Legacy crossfade involved an outgoing region not present in playlist \"%1\" - crossfade discarded"),
- name())
+ name())
<< endmsg;
continue;
}
if (in->layer() <= out->layer()) {
/* incoming region is below the outgoing one,
- * so apply a fade out to the outgoing one
+ * so apply a fade out to the outgoing one
*/
const XMLNodeList c = (*i)->children ();
-
+
for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
if ((*j)->name() == X_("FadeOut")) {
out_a->fade_out()->set_state (**j, version);
out_a->inverse_fade_out()->set_state (**j, version);
}
}
-
+
out_a->set_fade_out_active (true);
} else {
*/
const XMLNodeList c = (*i)->children ();
-
+
for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
if ((*j)->name() == X_("FadeIn")) {
in_a->fade_in()->set_state (**j, version);
in_a->inverse_fade_in()->set_state (**j, version);
}
}
-
+
in_a->set_fade_in_active (true);
}
}