switch Route::fed_by from shared_ptr to weak_ptr and thus begin to allow Route destru...
[ardour.git] / libs / ardour / ardour / export_channel.h
index 213bd2d9fa28136f2d9d3a76c78c8ac96a50ac6a..fdb466a06e053f441acf4b950f45334b545388cb 100644 (file)
@@ -21,9 +21,8 @@
 #ifndef __ardour_export_channel_h__
 #define __ardour_export_channel_h__
 
-#include <ardour/audioregion.h>
-#include <ardour/audio_track.h>
-#include <ardour/buffer_set.h>
+#include "ardour/audioregion.h"
+#include "ardour/buffer_set.h"
 
 #include <set>
 
@@ -33,6 +32,8 @@
 namespace ARDOUR {
 
 class Session;
+class AudioTrack;
+class AudioPort;
 
 /// Export channel base class interface for different source types
 class ExportChannel
@@ -43,13 +44,13 @@ class ExportChannel
 
        virtual void read (Sample * data, nframes_t frames) const = 0;
        virtual bool empty () const = 0;
-       
+
        /// Adds state to node passed
        virtual void get_state (XMLNode * node) const = 0;
-       
+
        /// Sets state from node passed
        virtual void set_state (XMLNode * node, Session & session) = 0;
-       
+
        // Operator< must be defined for usage in e.g. std::map or std::set to disallow duplicates when necessary
        virtual bool operator< (ExportChannel const & other) const = 0;
 };
@@ -71,13 +72,13 @@ class PortExportChannel : public ExportChannel
        typedef std::set<AudioPort *> PortSet;
 
        PortExportChannel () {}
-       
+
        void read (Sample * data, nframes_t frames) const;
        bool empty () const { return ports.empty(); }
-       
+
        void get_state (XMLNode * node) const;
        void set_state (XMLNode * node, Session & session);
-       
+
        bool operator< (ExportChannel const & other) const;
 
        void add_port (AudioPort * port) { ports.insert (port); }
@@ -96,13 +97,13 @@ class RegionExportChannelFactory : public sigc::trackable
                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);
-       
+
   private:
 
        int new_cycle_started () { buffers_up_to_date = false; return 0; }
@@ -118,7 +119,7 @@ class RegionExportChannelFactory : public sigc::trackable
        bool buffers_up_to_date;
        nframes_t region_start;
        nframes_t position;
-       
+
        Sample * mixdown_buffer;
        Sample * gain_buffer;
 };
@@ -130,19 +131,19 @@ class RegionExportChannel : public ExportChannel
 
   public:
        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) {};
+       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
        bool operator< (ExportChannel const & other) const { return this < &other; }
 
   private:
 
-       RegionExportChannel (RegionExportChannelFactory & factory, uint32_t channel) :
-         factory (factory),
-         channel (channel)
+       RegionExportChannel (RegionExportChannelFactory & factory, uint32_t channel)
+               : factory (factory)
+               , channel (channel)
        {}
-       
+
        RegionExportChannelFactory & factory;
        uint32_t channel;
 };