X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=blobdiff_plain;f=libs%2Fardour%2Fexport_channel.cc;h=cc388531df32fb96cb10a3ca9965f0bffb5d73dd;hp=296bfc9022493ada07e2d2a03e41de1fc9c8e59c;hb=c8c6bca6587450ff64303dbc994a4cd28d6ce7aa;hpb=b9185d2c07c77eccf3679ac99f6b69f8fdd79c48 diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index 296bfc9022..cc388531df 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -30,7 +30,7 @@ #include "pbd/error.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace ARDOUR; @@ -98,7 +98,7 @@ PortExportChannel::get_state (XMLNode * node) const void PortExportChannel::set_state (XMLNode * node, Session & session) { - XMLProperty * prop; + XMLProperty const * prop; XMLNodeList xml_ports = node->children ("Port"); for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) { if ((prop = (*it)->property ("name"))) { @@ -113,7 +113,7 @@ PortExportChannel::set_state (XMLNode * node, Session & session) } } -RegionExportChannelFactory::RegionExportChannelFactory (Session * session, AudioRegion const & region, AudioTrack & track, Type type) +RegionExportChannelFactory::RegionExportChannelFactory (Session * session, AudioRegion const & region, AudioTrack & track, Type type) : region (region) , track (track) , type (type) @@ -187,11 +187,12 @@ RegionExportChannelFactory::update_buffers (framecnt_t frames) assert (mixdown_buffer && gain_buffer); for (size_t channel = 0; channel < n_channels; ++channel) { memset (mixdown_buffer.get(), 0, sizeof (Sample) * frames); + buffers.get_audio (channel).silence(frames); region.read_at (buffers.get_audio (channel).data(), mixdown_buffer.get(), gain_buffer.get(), position, frames, channel); } break; case Processed: - track.export_stuff (buffers, position, frames, track.main_outs(), true, true); + track.export_stuff (buffers, position, frames, track.main_outs(), true, true, false); break; default: throw ExportFailed ("Unhandled type in ExportChannelFactory::update_buffers"); @@ -242,7 +243,7 @@ RouteExportChannel::read (Sample const *& data, framecnt_t frames) const #ifndef NDEBUG (void) frames; #else - assert (frames <= (framecnt_t) buffer.size()); + assert (frames <= (framecnt_t) buffer.capacity()); #endif data = buffer.data(); }