- Changed IO's vector<Port*>'s to PortList
[ardour.git] / libs / ardour / session_export.cc
index b39c4f22185cb4398c181b3400420dd76d28f0b9..c5449d3e06bb24b9533427817075f71b2dbfbc7a 100644 (file)
@@ -46,6 +46,7 @@
 #include <ardour/export.h>
 #include <ardour/sndfile_helpers.h>
 #include <ardour/port.h>
+#include <ardour/audio_port.h>
 #include <ardour/audioengine.h>
 #include <ardour/audio_diskstream.h>
 #include <ardour/panner.h>
@@ -604,8 +605,12 @@ Session::process_export (jack_nframes_t nframes, AudioExportSpecification* spec)
                        /* OK, this port's output is supposed to appear on this channel 
                         */
 
-                       Port* port = (*t).first;
-                       Sample* port_buffer = port->get_buffer (nframes);
+                       AudioPort* const port = dynamic_cast<AudioPort*>((*t).first);
+                       if (port == 0) {
+                               cerr << "FIXME: Non-audio export" << endl;
+                               continue;
+                       }
+                       Sample* port_buffer = port->get_audio_buffer().data(nframes);
 
                        /* now interleave the data from the channel into the float buffer */