diff options
author | Carl Hetherington <carl@carlh.net> | 2007-10-08 23:47:35 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2007-10-08 23:47:35 +0000 |
commit | 4d66204f4eb96ca802e9b301293ff4bd922717d0 (patch) | |
tree | e9ec9784f4cd1fd7673c783703221a6a53242e76 /libs/ardour/ardour | |
parent | 3f38e6b7f56ad85891d3669e0f1c58e6124b07f6 (diff) |
Various work on Bundles, especially dynamic ones so that you can, for example, pass tracks to busses by selecting the buss name from the track's output menu.
git-svn-id: svn://localhost/ardour2/trunk@2530 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/bundle.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/io.h | 20 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 17 |
3 files changed, 29 insertions, 14 deletions
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 1ed285a118..9c5f3cb21a 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -121,6 +121,12 @@ class InputBundle : public Bundle { class OutputBundle : public Bundle { public: + /** + * OutputBundle constructor. + * \param name Name. + * \param dy true if this Bundle is `dynamic'; ie it is created on-the-fly + * and should not be written to the session file. + */ OutputBundle (string name, bool dy = false) : Bundle (name, dy) {} OutputBundle (const XMLNode&); }; diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 4ab99c5f12..2b0b0f7781 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -120,11 +120,11 @@ class IO : public Automatable, public Latent int ensure_io (ChanCount in, ChanCount out, bool clear, void *src); - int use_input_bundle (Bundle&, void *src); - int use_output_bundle (Bundle&, void *src); + int connect_input_ports_to_bundle (boost::shared_ptr<Bundle>, void *src); + int connect_output_ports_to_bundle (boost::shared_ptr<Bundle>, void *src); - Bundle *input_bundle() const { return _input_bundle; } - Bundle *output_bundle() const { return _output_bundle; } + boost::shared_ptr<Bundle> input_bundle(); + boost::shared_ptr<Bundle> output_bundle(); int add_input_port (string source, void *src, DataType type = DataType::NIL); int add_output_port (string destination, void *src, DataType type = DataType::NIL); @@ -179,6 +179,9 @@ class IO : public Automatable, public Latent void attach_buffers(ChanCount ignored); + boost::shared_ptr<Bundle> bundle_for_inputs () const { return _bundle_for_inputs; } + boost::shared_ptr<Bundle> bundle_for_outputs () const { return _bundle_for_outputs; } + sigc::signal<void,IOChange,void*> input_changed; sigc::signal<void,IOChange,void*> output_changed; @@ -268,8 +271,8 @@ class IO : public Automatable, public Latent PortSet _outputs; PortSet _inputs; PeakMeter* _meter; - Bundle* _input_bundle; - Bundle* _output_bundle; + boost::shared_ptr<Bundle> _input_bundle; ///< bundle connected to our inputs + boost::shared_ptr<Bundle> _output_bundle; ///< bundle connected to our outputs bool no_panner_reset; bool _phase_invert; bool _denormal_protection; @@ -326,6 +329,8 @@ class IO : public Automatable, public Latent ChanCount _output_minimum; ChanCount _output_maximum; + boost::shared_ptr<Bundle> _bundle_for_inputs; + boost::shared_ptr<Bundle> _bundle_for_outputs; static int parse_io_string (const string&, vector<string>& chns); @@ -356,6 +361,9 @@ class IO : public Automatable, public Latent int32_t find_input_port_hole (); int32_t find_output_port_hole (); + + void create_bundles (); + void setup_bundles (); }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 540ad08011..94caf8a242 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -710,13 +710,14 @@ class Session : public PBD::StatefulDestructible /* I/O bundles */ - template<class T> void foreach_bundle (T *obj, void (T::*func)(Bundle *)); - void add_bundle (Bundle *); - void remove_bundle (Bundle *); - Bundle *bundle_by_name (string) const; + void foreach_bundle (sigc::slot<void, boost::shared_ptr<Bundle> >); + void add_bundle (boost::shared_ptr<Bundle>); + void remove_bundle (boost::shared_ptr<Bundle>); + boost::shared_ptr<Bundle> bundle_by_name (string) const; + boost::shared_ptr<Bundle> bundle_by_ports (vector<string> const &) const; - sigc::signal<void,Bundle *> BundleAdded; - sigc::signal<void,Bundle *> BundleRemoved; + sigc::signal<void,boost::shared_ptr<Bundle> > BundleAdded; + sigc::signal<void,boost::shared_ptr<Bundle> > BundleRemoved; /* MIDI */ @@ -1558,9 +1559,9 @@ class Session : public PBD::StatefulDestructible /* I/O bundles */ - typedef list<Bundle *> BundleList; + typedef list<boost::shared_ptr<Bundle> > BundleList; mutable Glib::Mutex bundle_lock; - BundleList _bundles; + BundleList _bundles; int load_bundles (const XMLNode&); void reverse_diskstream_buffers (); |