Fix the horrible mess that was anything related to sources and paths.
[ardour.git] / libs / ardour / ardour / export_channel.h
index dd351bfd70bdf57c56ee1215cb05cf4c2af82b49..d7c363860ce0cfbba598f51716819eadbb06ac94 100644 (file)
@@ -22,7 +22,6 @@
 #define __ardour_export_channel_h__
 
 #include <ardour/audioregion.h>
-#include <ardour/audio_track.h>
 #include <ardour/buffer_set.h>
 
 #include <set>
 namespace ARDOUR {
 
 class Session;
+class AudioTrack;
+class AudioPort;
 
 /// Export channel base class interface for different source types
 class ExportChannel
 {
   public:
+
+       virtual ~ExportChannel () {}
+
        virtual void read (Sample * data, nframes_t frames) const = 0;
        virtual bool empty () const = 0;
        
@@ -69,13 +73,13 @@ class PortExportChannel : public ExportChannel
 
        PortExportChannel () {}
        
-       virtual void read (Sample * data, nframes_t frames) const;
-       virtual bool empty () const { return ports.empty(); }
+       void read (Sample * data, nframes_t frames) const;
+       bool empty () const { return ports.empty(); }
        
-       virtual void get_state (XMLNode * node) const;
-       virtual void set_state (XMLNode * node, Session & session);
+       void get_state (XMLNode * node) const;
+       void set_state (XMLNode * node, Session & session);
        
-       virtual bool operator< (ExportChannel const & other) const;
+       bool operator< (ExportChannel const & other) const;
 
        void add_port (AudioPort * port) { ports.insert (port); }
        PortSet const & get_ports () { return ports; }
@@ -90,10 +94,12 @@ class RegionExportChannelFactory : public sigc::trackable
   public:
        enum Type {
                Raw,
+               Fades,
                Processed
        };
        
        RegionExportChannelFactory (Session * session, AudioRegion const & region, AudioTrack & track, Type type);
+       ~RegionExportChannelFactory ();
 
        ExportChannelPtr create (uint32_t channel);
        void read (uint32_t channel, Sample * data, nframes_t frames_to_read);
@@ -113,6 +119,9 @@ class RegionExportChannelFactory : public sigc::trackable
        bool buffers_up_to_date;
        nframes_t region_start;
        nframes_t position;
+       
+       Sample * mixdown_buffer;
+       Sample * gain_buffer;
 };
 
 /// Export channel that reads from region channel
@@ -121,12 +130,12 @@ class RegionExportChannel : public ExportChannel
        friend class RegionExportChannelFactory;
 
   public:
-       virtual void read (Sample * data, nframes_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
-       virtual void get_state (XMLNode * node) const {};
-       virtual void set_state (XMLNode * node, Session & session) {};
-       virtual bool empty () const { return false; }
+       void read (Sample * data, nframes_t frames_to_read) const { factory.read (channel, data, frames_to_read); }
+       void get_state (XMLNode * node) const {};
+       void set_state (XMLNode * node, Session & session) {};
+       bool empty () const { return false; }
        // Region export should never have duplicate channels, so there need not be any semantics here
-       virtual bool operator< (ExportChannel const & other) const { return this < &other; }
+       bool operator< (ExportChannel const & other) const { return this < &other; }
 
   private: