X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_channel.h;h=894406874e40ec8b1e249be71c4e7ba80ba26718;hb=eaa1dacf5fc9537cfff36e2339bd07aab348aa2e;hp=5e42956cdb7b4306b0ce4c6c1967477c5102e01e;hpb=a406d9183adc67075a4e802fd8254c2560df9964;p=ardour.git diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index 5e42956cdb..894406874e 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -23,14 +23,13 @@ #include -#include -#include #include -#include +#include #include "pbd/signals.h" #include "ardour/buffer_set.h" +#include "ardour/export_pointers.h" namespace ARDOUR { @@ -41,13 +40,13 @@ class AudioRegion; class CapturingProcessor; /// Export channel base class interface for different source types -class ExportChannel : public boost::less_than_comparable +class LIBARDOUR_API ExportChannel : public boost::less_than_comparable { public: virtual ~ExportChannel () {} - virtual void set_max_buffer_size(framecnt_t frames) { } + virtual void set_max_buffer_size(framecnt_t) { } virtual void read (Sample const *& data, framecnt_t frames) const = 0; virtual bool empty () const = 0; @@ -62,22 +61,11 @@ class ExportChannel : public boost::less_than_comparable virtual bool operator< (ExportChannel const & other) const = 0; }; -/// Safe pointer for storing ExportChannels in ordered STL containers -class ExportChannelPtr : public boost::shared_ptr - , public boost::less_than_comparable -{ - public: - ExportChannelPtr () {} - template explicit ExportChannelPtr (Y * ptr) : boost::shared_ptr (ptr) {} - - bool operator< (ExportChannelPtr const & other) const { return **this < *other; } -}; - /// Basic export channel that reads from AudioPorts -class PortExportChannel : public ExportChannel +class LIBARDOUR_API PortExportChannel : public ExportChannel { public: - typedef std::set PortSet; + typedef std::set > PortSet; PortExportChannel (); void set_max_buffer_size(framecnt_t frames); @@ -90,7 +78,7 @@ class PortExportChannel : public ExportChannel bool operator< (ExportChannel const & other) const; - void add_port (AudioPort * port) { ports.insert (port); } + void add_port (boost::weak_ptr port) { ports.insert (port); } PortSet const & get_ports () { return ports; } private: @@ -99,11 +87,13 @@ class PortExportChannel : public ExportChannel framecnt_t buffer_size; }; + /// Handles RegionExportChannels and does actual reading from region -class RegionExportChannelFactory +class LIBARDOUR_API RegionExportChannelFactory { public: enum Type { + None, Raw, Fades, Processed @@ -138,7 +128,7 @@ class RegionExportChannelFactory }; /// Export channel that reads from region channel -class RegionExportChannel : public ExportChannel +class LIBARDOUR_API RegionExportChannel : public ExportChannel { friend class RegionExportChannelFactory; @@ -162,7 +152,7 @@ class RegionExportChannel : public ExportChannel }; /// Export channel for exporting from different positions in a route -class RouteExportChannel : public ExportChannel +class LIBARDOUR_API RouteExportChannel : public ExportChannel { class ProcessorRemover; // fwd declaration @@ -171,7 +161,7 @@ class RouteExportChannel : public ExportChannel boost::shared_ptr remover); ~RouteExportChannel(); - static void create_from_route(std::list & result, Route & route); + static void create_from_route(std::list & result, boost::shared_ptr route); public: // ExportChannel interface void set_max_buffer_size(framecnt_t frames); @@ -189,11 +179,11 @@ class RouteExportChannel : public ExportChannel // Removes the processor from the track when deleted class ProcessorRemover { public: - ProcessorRemover (Route & route, boost::shared_ptr processor) + ProcessorRemover (boost::shared_ptr route, boost::shared_ptr processor) : route (route), processor (processor) {} ~ProcessorRemover(); private: - Route & route; + boost::shared_ptr route; boost::shared_ptr processor; };