diff options
author | David Robillard <d@drobilla.net> | 2006-08-01 03:23:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-08-01 03:23:35 +0000 |
commit | 6f4a92f740b2fd75794489ce58f9348f8adf6bf4 (patch) | |
tree | 68ecd4d29bf7d1db00da9dfa9e14ac2e93ca1e42 /libs/ardour/ardour/io.h | |
parent | ba0c8bc2ef92a84b99040df46e76d8ac54d3d9da (diff) |
Heavy-duty abstraction work to split type-specific classes into
specializations of (new, for the most part) generic bases. (eg. most everything
from the MIDI branch except for actual MIDI things, so merges have a chance of
succeeding). Also the new edit toolbar, and various other cleanup things I did
along the way.
Should be functionally equivalent (except the toolbar), this is just design work.
She's a big'un....
git-svn-id: svn://localhost/ardour2/trunk@727 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/io.h')
-rw-r--r-- | libs/ardour/ardour/io.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 0356da8dc8..35b20f655e 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -38,6 +38,7 @@ #include <ardour/utils.h> #include <ardour/state_manager.h> #include <ardour/curve.h> +#include <ardour/types.h> using std::string; using std::vector; @@ -52,6 +53,11 @@ class Port; class Connection; class Panner; +/** A collection of input and output ports with connections. + * + * An IO can contain ports of varying types, making routes/inserts/etc with + * varied combinations of types (eg MIDI and audio) possible. + */ class IO : public Stateful, public ARDOUR::StateManager { @@ -60,7 +66,8 @@ class IO : public Stateful, public ARDOUR::StateManager IO (Session&, string name, int input_min = -1, int input_max = -1, - int output_min = -1, int output_max = -1); + int output_min = -1, int output_max = -1, + DataType default_type = AUDIO); virtual ~IO(); @@ -74,25 +81,29 @@ class IO : public Stateful, public ARDOUR::StateManager void set_output_minimum (int n); void set_output_maximum (int n); + DataType default_type() const { return _default_type; } + const string& name() const { return _name; } virtual int set_name (string str, void *src); virtual void silence (jack_nframes_t, jack_nframes_t offset); + // These should be moved in to a separate object that manipulates an IO + void pan (vector<Sample*>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff); void pan_automated (vector<Sample*>& bufs, uint32_t nbufs, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset); void collect_input (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset); - void deliver_output (vector<Sample *>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset); - void deliver_output_no_pan (vector<Sample *>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset); + void deliver_output (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset); + void deliver_output_no_pan (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset); void just_meter_input (jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t nframes, jack_nframes_t offset); virtual uint32_t n_process_buffers () { return 0; } virtual void set_gain (gain_t g, void *src); - void inc_gain (gain_t delta, void *src); - gain_t gain () const { return _desired_gain; } + void inc_gain (gain_t delta, void *src); + gain_t gain () const { return _desired_gain; } virtual gain_t effective_gain () const; Panner& panner() { return *_panner; } @@ -105,8 +116,8 @@ class IO : public Stateful, public ARDOUR::StateManager Connection *input_connection() const { return _input_connection; } Connection *output_connection() const { return _output_connection; } - int add_input_port (string source, void *src); - int add_output_port (string destination, void *src); + int add_input_port (string source, void *src, DataType type = NIL); + int add_output_port (string destination, void *src, DataType type = NIL); int remove_input_port (Port *, void *src); int remove_output_port (Port *, void *src); @@ -273,6 +284,7 @@ public: PBD::ID _id; bool no_panner_reset; XMLNode* deferred_state; + DataType _default_type; virtual void set_deferred_state() {} |