summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export.h
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2005-09-24 19:13:41 +0000
committerTaybin Rutkin <taybin@taybin.com>2005-09-24 19:13:41 +0000
commit8af0757b61990767f2a85e68f535a5af9976fd79 (patch)
treef9e06fe12cac866d658a2e7074a61aa74d12f68f /libs/ardour/ardour/export.h
parentf9546e5c76afa101e9dbe8a057e72463b03430e5 (diff)
libardour added.
git-svn-id: svn://localhost/trunk/ardour2@17 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/export.h')
-rw-r--r--libs/ardour/ardour/export.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/libs/ardour/ardour/export.h b/libs/ardour/ardour/export.h
new file mode 100644
index 0000000000..9a6da1592b
--- /dev/null
+++ b/libs/ardour/ardour/export.h
@@ -0,0 +1,88 @@
+#ifndef __ardour_export_h__
+#define __ardour_export_h__
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <sigc++/signal.h>
+
+#include <sndfile.h>
+#include <samplerate.h>
+
+#include <ardour/ardour.h>
+#include <ardour/gdither.h>
+
+using std::map;
+using std::vector;
+using std::string;
+using std::pair;
+
+namespace ARDOUR
+{
+ class Port;
+
+ typedef pair<Port *, uint32_t> PortChannelPair;
+ typedef map<uint32_t, vector<PortChannelPair> > AudioExportPortMap;
+
+ struct AudioExportSpecification : public SF_INFO, public sigc::trackable {
+
+ AudioExportSpecification();
+ ~AudioExportSpecification ();
+
+ void init ();
+ void clear ();
+
+
+ int prepare (jack_nframes_t blocksize, jack_nframes_t frame_rate);
+
+ int process (jack_nframes_t nframes);
+
+ /* set by the user */
+
+ string path;
+ jack_nframes_t sample_rate;
+
+ int src_quality;
+ SNDFILE* out;
+ uint32_t channels;
+ AudioExportPortMap port_map;
+ jack_nframes_t start_frame;
+ jack_nframes_t end_frame;
+ GDitherType dither_type;
+ bool do_freewheel;
+
+ /* used exclusively during export */
+
+ jack_nframes_t frame_rate;
+ GDither dither;
+ float* dataF;
+ float* dataF2;
+ float* leftoverF;
+ jack_nframes_t leftover_frames;
+ jack_nframes_t max_leftover_frames;
+ void* output_data;
+ jack_nframes_t out_samples_max;
+ uint32_t sample_bytes;
+ uint32_t data_width;
+
+ jack_nframes_t total_frames;
+ SF_INFO sfinfo;
+ SRC_DATA src_data;
+ SRC_STATE* src_state;
+ jack_nframes_t pos;
+
+ sigc::connection freewheel_connection;
+
+ /* shared between UI thread and audio thread */
+
+ float progress; /* audio thread sets this */
+ bool stop; /* UI sets this */
+ bool running; /* audio thread sets to false when export is done */
+
+ int status;
+
+ };
+};
+
+#endif /* __ardour_export_h__ */