1 #ifndef __ardour_export_h__
2 #define __ardour_export_h__
8 #include <sigc++/signal.h>
11 #include <samplerate.h>
13 #include <ardour/ardour.h>
14 #include <ardour/gdither.h>
25 typedef pair<Port *, uint32_t> PortChannelPair;
26 typedef map<uint32_t, vector<PortChannelPair> > AudioExportPortMap;
28 struct AudioExportSpecification : public SF_INFO, public sigc::trackable {
30 AudioExportSpecification();
31 ~AudioExportSpecification ();
37 int prepare (nframes_t blocksize, nframes_t frame_rate);
39 int process (nframes_t nframes);
44 nframes_t sample_rate;
49 AudioExportPortMap port_map;
50 nframes_t start_frame;
52 GDitherType dither_type;
55 /* used exclusively during export */
62 nframes_t leftover_frames;
63 nframes_t max_leftover_frames;
65 nframes_t out_samples_max;
66 uint32_t sample_bytes;
69 nframes_t total_frames;
75 sigc::connection freewheel_connection;
77 /* shared between UI thread and audio thread */
79 float progress; /* audio thread sets this */
80 bool stop; /* UI sets this */
81 bool running; /* audio thread sets to false when export is done */
88 #endif /* __ardour_export_h__ */