#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;
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; }
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);
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
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: