switch Evoral::Sequence debugging to use DEBUG_TRACE(); Sequence uses multiset<....
[ardour.git] / libs / ardour / export_channel.cc
index 3006fbc3ee68bb85cec40311a3f07bc33a1288dc..f94ee1325792e787dd6eba39c6f0bb690c732e8a 100644 (file)
@@ -45,7 +45,7 @@ PortExportChannel::read (Sample * data, nframes_t frames) const
 
        for (PortSet::const_iterator it = ports.begin(); it != ports.end(); ++it) {
                if (*it != 0) {
-                       Sample* port_buffer = (*it)->get_audio_buffer(frames, 0).data();
+                       Sample* port_buffer = (*it)->get_audio_buffer(frames).data();
 
                        for (uint32_t i = 0; i < frames; ++i) {
                                data[i] += (float) port_buffer[i];
@@ -108,10 +108,10 @@ RegionExportChannelFactory::RegionExportChannelFactory (Session * session, Audio
                throw ExportFailed ("Unhandled type in ExportChannelFactory constructor");
        }
 
-       export_connection = session->ProcessExport.connect (boost::bind (&RegionExportChannelFactory::new_cycle_started, this, _1));
+       session->ProcessExport.connect_same_thread (export_connection, boost::bind (&RegionExportChannelFactory::new_cycle_started, this, _1));
 
-       buffers.set_count (ChanCount (DataType::AUDIO, n_channels));
        buffers.ensure_buffers (DataType::AUDIO, n_channels, frames_per_cycle);
+       buffers.set_count (ChanCount (DataType::AUDIO, n_channels));
 }
 
 RegionExportChannelFactory::~RegionExportChannelFactory ()