summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/chan_count.h8
-rw-r--r--libs/ardour/ardour/io.h3
-rw-r--r--libs/ardour/ardour/port_insert.h3
-rw-r--r--libs/ardour/ardour/return.h71
-rw-r--r--libs/ardour/ardour/send.h9
-rw-r--r--libs/ardour/ardour/session.h5
6 files changed, 87 insertions, 12 deletions
diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h
index c9b543c4ba..ccae3920f6 100644
--- a/libs/ardour/ardour/chan_count.h
+++ b/libs/ardour/ardour/chan_count.h
@@ -106,6 +106,14 @@ public:
return ( (*this > other) || (*this == other) );
}
+ ChanCount operator+(const ChanCount& other) const {
+ ChanCount ret;
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ ret.set(*t, get(*t) + other.get(*t));
+ }
+ return ret;
+ }
+
static ChanCount min(const ChanCount& a, const ChanCount& b) {
ChanCount ret;
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 3e36d10be3..fbaf379a30 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -102,7 +102,7 @@ class IO : public SessionObject, public AutomatableControls, public Latent
virtual void silence (nframes_t);
- void collect_input (BufferSet& bufs, nframes_t nframes);
+ void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset=ChanCount::ZERO);
void deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
void just_meter_input (nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
@@ -214,7 +214,6 @@ class IO : public SessionObject, public AutomatableControls, public Latent
static sigc::signal<int> ConnectingLegal;
/// raised when the number of input or output ports changes
static sigc::signal<void,ChanCount> PortCountChanged;
- static sigc::signal<int> PortsCreated;
static sigc::signal<void,nframes_t> CycleStart;
static void update_meters();
diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h
index 076e4af9d1..ce21d9f223 100644
--- a/libs/ardour/ardour/port_insert.h
+++ b/libs/ardour/ardour/port_insert.h
@@ -54,9 +54,6 @@ class PortInsert : public IOProcessor
nframes_t signal_latency() const;
- ChanCount output_streams() const;
- ChanCount input_streams() const;
-
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h
new file mode 100644
index 0000000000..af55df59ed
--- /dev/null
+++ b/libs/ardour/ardour/return.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2009 Paul Davis
+ Author: Dave Robillard
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_return_h__
+#define __ardour_return_h__
+
+#include <sigc++/signal.h>
+#include <string>
+
+
+#include "pbd/stateful.h"
+#include "ardour/ardour.h"
+#include "ardour/audioengine.h"
+#include "ardour/io_processor.h"
+
+namespace ARDOUR {
+
+class Return : public IOProcessor
+{
+public:
+ Return (Session&);
+ Return (Session&, const XMLNode&);
+ virtual ~Return ();
+
+ uint32_t bit_slot() const { return _bitslot; }
+
+ void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
+
+ void activate() {}
+ void deactivate () {}
+
+ XMLNode& state(bool full);
+ XMLNode& get_state(void);
+ int set_state(const XMLNode& node);
+
+ uint32_t pans_required() const { return _configured_input.n_audio(); }
+
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
+ bool configure_io (ChanCount in, ChanCount out);
+
+ static uint32_t how_many_sends();
+ static void make_unique (XMLNode &, Session &);
+
+private:
+ /* disallow copy construction */
+ Return (const Return&);
+
+ uint32_t _bitslot;
+};
+
+} // namespace ARDOUR
+
+#endif /* __ardour_return_h__ */
+
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index 77bb6d9017..825506f0e2 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -38,10 +38,7 @@ class Send : public IOProcessor
Send (Session&, const XMLNode&);
virtual ~Send ();
- uint32_t bit_slot() const { return bitslot; }
-
- ChanCount output_streams() const;
- ChanCount input_streams () const;
+ uint32_t bit_slot() const { return _bitslot; }
void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
@@ -55,7 +52,6 @@ class Send : public IOProcessor
int set_state(const XMLNode& node);
uint32_t pans_required() const { return _configured_input.n_audio(); }
- void expect_inputs (const ChanCount&);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
@@ -68,8 +64,7 @@ class Send : public IOProcessor
Send (const Send&);
bool _metering;
- ChanCount expected_inputs;
- uint32_t bitslot;
+ uint32_t _bitslot;
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 1e3855c308..86a2f778dc 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -101,6 +101,7 @@ class Port;
class PortInsert;
class Processor;
class Region;
+class Return;
class Route;
class RouteGroup;
class SMFSource;
@@ -764,8 +765,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
}
uint32_t next_send_id();
+ uint32_t next_return_id();
uint32_t next_insert_id();
void mark_send_id (uint32_t);
+ void mark_return_id (uint32_t);
void mark_insert_id (uint32_t);
/* s/w "RAID" management */
@@ -1566,7 +1569,9 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
list<PortInsert *> _port_inserts;
list<PluginInsert *> _plugin_inserts;
list<Send *> _sends;
+ list<Return *> _returns;
boost::dynamic_bitset<uint32_t> send_bitset;
+ boost::dynamic_bitset<uint32_t> return_bitset;
boost::dynamic_bitset<uint32_t> insert_bitset;
uint32_t send_cnt;
uint32_t insert_cnt;