44 class CapturingProcessor;
58 virtual bool empty ()
const = 0;
60 virtual bool audio ()
const {
return true; }
61 virtual bool midi ()
const {
return false; }
79 typedef std::set<std::weak_ptr<AudioPort>, std::owner_less<std::weak_ptr<AudioPort>>>
PortSet;
89 bool empty ()
const {
return ports.empty (); }
98 void add_port (std::weak_ptr<AudioPort> port) { ports.insert (port); }
122 bool empty ()
const {
return _port.expired (); }
124 bool audio ()
const {
return false; }
125 bool midi ()
const {
return true; }
134 std::shared_ptr<MidiPort>
port ()
const {
return _port.lock (); }
167 buffers_up_to_date =
false;
197 factory.read (channel, buf, samples_to_read);
205 bool empty ()
const {
return false; }
210 return this < &other;
233 std::shared_ptr<ProcessorRemover> remover);
237 static void create_from_route (std::list<ExportChannelPtr>& result, std::shared_ptr<Route> route);
245 bool empty ()
const {
return false; }
250 std::shared_ptr<Route>
route ()
const {
return _remover->route (); }
264 ProcessorRemover (std::shared_ptr<Route> route, std::shared_ptr<CapturingProcessor> processor)
266 , _processor (processor)
271 std::shared_ptr<Route>
route ()
const {
return _route; }
Export channel base class interface for different source types.
virtual void read(Buffer const *&, samplecnt_t samples) const =0
virtual void get_state(XMLNode *node) const =0
Adds state to node passed.
virtual void prepare_export(samplecnt_t max_samples, sampleoffset_t common_latency)
virtual std::string state_node_name() const =0
virtual samplecnt_t common_port_playback_latency() const
virtual bool audio() const
virtual bool empty() const =0
virtual void set_state(XMLNode *node, Session &session)=0
Sets state from node passed.
virtual bool midi() const
Basic export channel that reads from AudioPorts.
PortSet const & get_ports() const
void read(Buffer const *&, samplecnt_t samples) const
std::set< std::weak_ptr< AudioPort >, std::owner_less< std::weak_ptr< AudioPort > > > PortSet
std::string state_node_name() const
void add_port(std::weak_ptr< AudioPort > port)
std::unique_ptr< Sample[]> _buffer
samplecnt_t common_port_playback_latency() const
void get_state(XMLNode *node) const
Adds state to node passed.
void prepare_export(samplecnt_t max_samples, sampleoffset_t common_latency)
void set_state(XMLNode *node, Session &session)
Sets state from node passed.
std::list< std::shared_ptr< PBD::RingBuffer< Sample > > > _delaylines
Basic export channel that reads from MIDIPorts.
void set_state(XMLNode *node, Session &session)
Sets state from node passed.
void read(Buffer const *&, samplecnt_t samples) const
void prepare_export(samplecnt_t max_samples, sampleoffset_t common_latency)
std::string state_node_name() const
void set_port(std::weak_ptr< MidiPort > port)
samplecnt_t common_port_playback_latency() const
std::shared_ptr< MidiPort > port() const
void get_state(XMLNode *node) const
Adds state to node passed.
std::weak_ptr< MidiPort > _port
Handles RegionExportChannels and does actual reading from region.
int new_cycle_started(samplecnt_t)
void update_buffers(samplecnt_t samples)
RegionExportChannelFactory(Session *session, AudioRegion const ®ion, AudioTrack &track, Type type)
PBD::ScopedConnection export_connection
AudioRegion const & region
std::unique_ptr< Sample[]> mixdown_buffer
std::unique_ptr< Sample[]> gain_buffer
void read(uint32_t channel, Buffer const *&, samplecnt_t samples_to_read)
~RegionExportChannelFactory()
samplecnt_t samples_per_cycle
ExportChannelPtr create(uint32_t channel)
Export channel that reads from region channel.
void read(Buffer const *&buf, samplecnt_t samples_to_read) const
RegionExportChannelFactory & factory
void set_state(XMLNode *, Session &)
Sets state from node passed.
RegionExportChannel(RegionExportChannelFactory &factory, uint32_t channel)
std::string state_node_name() const
void get_state(XMLNode *) const
Adds state to node passed.
std::shared_ptr< Route > _route
ProcessorRemover(std::shared_ptr< Route > route, std::shared_ptr< CapturingProcessor > processor)
std::shared_ptr< CapturingProcessor > _processor
std::shared_ptr< Route > route() const
Export channel for exporting from different positions in a route.
std::shared_ptr< CapturingProcessor > _processor
void read(Buffer const *&, samplecnt_t samples) const
RouteExportChannel(std::shared_ptr< CapturingProcessor > processor, DataType type, size_t channel, std::shared_ptr< ProcessorRemover > remover)
std::shared_ptr< Route > route() const
std::shared_ptr< ProcessorRemover > _remover
void prepare_export(samplecnt_t max_samples, sampleoffset_t common_latency)
std::string state_node_name() const
void set_state(XMLNode *node, Session &session)
Sets state from node passed.
void get_state(XMLNode *node) const
Adds state to node passed.
static void create_from_state(std::list< ExportChannelPtr > &result, Session &, XMLNode *)
static void create_from_route(std::list< ExportChannelPtr > &result, std::shared_ptr< Route > route)
void session(lua_State *L)
PBD::PropertyDescriptor< bool > region
Temporal::samplecnt_t samplecnt_t
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t