2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_export_h__
21 #define __ardour_export_h__
27 #include <sigc++/signal.h>
30 #include <samplerate.h>
32 #include <ardour/ardour.h>
33 #include <ardour/gdither.h>
44 typedef pair<Port *, uint32_t> PortChannelPair;
45 typedef map<uint32_t, vector<PortChannelPair> > AudioExportPortMap;
47 struct AudioExportSpecification : public SF_INFO, public sigc::trackable {
49 AudioExportSpecification();
50 ~AudioExportSpecification ();
56 int prepare (nframes_t blocksize, nframes_t frame_rate);
58 int process (nframes_t nframes);
63 nframes_t sample_rate;
68 AudioExportPortMap port_map;
69 nframes_t start_frame;
71 GDitherType dither_type;
74 /* used exclusively during export */
81 nframes_t leftover_frames;
82 nframes_t max_leftover_frames;
84 nframes_t out_samples_max;
85 uint32_t sample_bytes;
88 nframes_t total_frames;
94 sigc::connection freewheel_connection;
96 /* shared between UI thread and audio thread */
98 volatile float progress; /* audio thread sets this */
99 volatile bool stop; /* UI sets this */
100 volatile bool running; /* audio thread sets to false when export is done */
105 } // namespace ARDOUR
107 #endif /* __ardour_export_h__ */