X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Fexport_channel.cc;h=26f5a7bb28611543ffb4711a8d20b7919b4b4fc6;hb=24f64b3ea7386ace6d584503fe1397eb4f611dfe;hp=c67f33bb918e5dc3b4a0f69b1328a7d2a123c6d3;hpb=52003be3695ab703b936163d7284e208790d5363;p=ardour.git diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index c67f33bb91..26f5a7bb28 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -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"); @@ -239,7 +240,11 @@ RouteExportChannel::read (Sample const *& data, framecnt_t frames) const { assert(processor); AudioBuffer const & buffer = processor->get_capture_buffers().get_audio (channel); - assert (frames <= (framecnt_t) buffer.size()); +#ifndef NDEBUG + (void) frames; +#else + assert (frames <= (framecnt_t) buffer.capacity()); +#endif data = buffer.data(); }