Don't strip suffixes twice from peakfile names, otherwise source names like fred...
[ardour.git] / libs / ardour / export_channel.cc
index dfe038734b60bbe77ebc9505b2092e39c3aa9ddf..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");
        }
 
-       session->ProcessExport.connect (export_connection, 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 ()