diff options
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/ardour.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/audio_buffer.h | 7 | ||||
-rw-r--r-- | libs/ardour/ardour/buffer.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/buffer_set.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/delivery.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/internal_return.h | 60 | ||||
-rw-r--r-- | libs/ardour/ardour/internal_send.h | 57 | ||||
-rw-r--r-- | libs/ardour/ardour/io_processor.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/meter.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_buffer.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/processor.h | 3 | ||||
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/region.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/return.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 25 | ||||
-rw-r--r-- | libs/ardour/ardour/send.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 13 |
17 files changed, 161 insertions, 35 deletions
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 630bde675c..892df2eb50 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -47,6 +47,7 @@ namespace ARDOUR { int init (bool with_vst, bool try_optimization); int cleanup (); + bool no_auto_connect (); std::string get_ardour_revision (); diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index ca1b36e0b1..be1af03061 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -56,6 +56,13 @@ public: } _written = true; } + + /** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/ + void merge_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) { + const AudioBuffer* ab = dynamic_cast<const AudioBuffer*>(&src); + assert (ab); + accumulate_from (*ab, len, dst_offset, src_offset); + } /** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/ void accumulate_from (const AudioBuffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) { diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h index da75556877..8ed054923b 100644 --- a/libs/ardour/ardour/buffer.h +++ b/libs/ardour/ardour/buffer.h @@ -76,6 +76,7 @@ public: virtual void clear() { silence(_capacity, 0); } virtual void read_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) = 0; + virtual void merge_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) = 0; protected: Buffer(DataType type, size_t capacity) diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 3f10929fe8..ecd4e4ab72 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -68,6 +68,7 @@ public: void is_silent(bool yn) { _is_silent = yn; } bool is_silent() const { return _is_silent; } + void silence (nframes_t nframes, nframes_t offset); void set_count(const ChanCount& count) { assert(count <= _available); _count = count; } @@ -94,6 +95,7 @@ public: #endif void read_from(BufferSet& in, nframes_t nframes); + void merge_from(BufferSet& in, nframes_t nframes); // ITERATORS // FIXME: possible to combine these? templates? diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index c875f23fcc..32ecc98215 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -40,7 +40,13 @@ public: Main = 0x8 }; + /* Delivery to an existing output */ + Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role); + Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<MuteMaster> mm, const XMLNode&); + + /* Delivery to a new output owned by this object */ + Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role); Delivery (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&); diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h new file mode 100644 index 0000000000..6aa8bfe7b4 --- /dev/null +++ b/libs/ardour/ardour/internal_return.h @@ -0,0 +1,60 @@ +/* + Copyright (C) 2009 Paul Davis + + 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_internal_return_h__ +#define __ardour_internal_return_h__ + +#include <sigc++/signal.h> + +#include "ardour/ardour.h" +#include "ardour/return.h" +#include "ardour/buffer_set.h" + +namespace ARDOUR { + +class InternalReturn : public Return +{ + public: + InternalReturn (Session&); + InternalReturn (Session&, const XMLNode&); + + XMLNode& state(bool full); + XMLNode& get_state(void); + int set_state(const XMLNode& node); + + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + bool configure_io (ChanCount in, ChanCount out); + bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; + void set_block_size (nframes_t); + + BufferSet* get_buffers(); + void release_buffers(); + + static sigc::signal<void,nframes_t> CycleStart; + + private: + BufferSet buffers; + uint32_t user_count; + void allocate_buffers (nframes_t); + void cycle_start (nframes_t); +}; + +} // namespace ARDOUR + +#endif /* __ardour_internal_return_h__ */ diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h new file mode 100644 index 0000000000..0bbb75d685 --- /dev/null +++ b/libs/ardour/ardour/internal_send.h @@ -0,0 +1,57 @@ +/* + Copyright (C) 2009 Paul Davis + + 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_internal_send_h__ +#define __ardour_internal_send_h__ + +#include "ardour/ardour.h" +#include "ardour/send.h" + +namespace ARDOUR { + +class InternalSend : public Send +{ + public: + InternalSend (Session&, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to); + InternalSend (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&); + virtual ~InternalSend (); + + XMLNode& state(bool full); + XMLNode& get_state(void); + int set_state(const XMLNode& node); + + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + bool feeds (boost::shared_ptr<Route> other) const; + bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; + + boost::shared_ptr<Route> target_route() const { return _send_to; } + + private: + BufferSet* target; + boost::shared_ptr<Route> _send_to; + PBD::ID _send_to_id; + sigc::connection connect_c; + + void send_to_going_away (); + int connect_when_legal (); +}; + +} // namespace ARDOUR + +#endif /* __ardour_send_h__ */ diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 14d88d6b44..430f54d46d 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -37,6 +37,7 @@ namespace ARDOUR { class Session; class IO; +class Route; /** A mixer strip element (Processor) with 1 or 2 IO elements. */ @@ -66,6 +67,8 @@ class IOProcessor : public Processor void silence (nframes_t nframes); + virtual bool feeds (boost::shared_ptr<Route> other) const; + sigc::signal<void,IOProcessor*,bool> AutomationPlaybackChanged; sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged; diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index 57afcc39ca..414b559de0 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -51,6 +51,7 @@ class Metering { class PeakMeter : public Processor { public: PeakMeter(Session& s) : Processor(s, "Meter") {} + PeakMeter(Session&s, const XMLNode& node); void meter(); diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h index 64417cae26..4e27e33235 100644 --- a/libs/ardour/ardour/midi_buffer.h +++ b/libs/ardour/ardour/midi_buffer.h @@ -39,6 +39,7 @@ public: void silence (nframes_t nframes, nframes_t offset = 0); void read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset = 0, nframes_t src_offset = 0); + void merge_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset = 0, nframes_t src_offset = 0); void copy(const MidiBuffer& copy); diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 06fcb81ce7..f91e9a6863 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -50,7 +50,8 @@ class Processor : public SessionObject, public AutomatableControls, public Laten static const std::string state_node_name; Processor(Session&, const std::string& name); - + Processor(Session&, const XMLNode& node); + virtual ~Processor() { } virtual bool visible() const { return true; } diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 7387e5d001..3f063f4692 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -19,7 +19,7 @@ /* IO connection */ -CONFIG_VARIABLE (bool, auto_connect_master, "auto-connect-master", true) +CONFIG_VARIABLE (bool, auto_connect_standard_busses, "auto-connect-standard-busses", true) CONFIG_VARIABLE (AutoConnectOption, output_auto_connect, "output-auto-connect", AutoConnectOption (0)) CONFIG_VARIABLE (AutoConnectOption, input_auto_connect, "input-auto-connect", AutoConnectOption (0)) diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index aa768e269f..d2cc252d61 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -74,7 +74,7 @@ class Region LeftOfSplit = 0x4000, RightOfSplit = 0x8000, Hidden = 0x10000, - DoNotSaveState = 0x20000, + DoNotSendPropertyChanges = 0x20000, PositionLocked = 0x40000, // range_guarantoor = USHRT_MAX @@ -97,6 +97,8 @@ class Region sigc::signal<void,Change> StateChanged; static sigc::signal<void,boost::shared_ptr<ARDOUR::Region> > RegionPropertyChanged; + void unlock_property_changes () { _flags = Flag (_flags & ~DoNotSendPropertyChanges); } + void block_property_changes () { _flags = Flag (_flags | DoNotSendPropertyChanges); } virtual ~Region(); @@ -160,8 +162,6 @@ class Region void set_position_lock_style (PositionLockStyle ps); void recompute_position_from_lock_style (); - virtual bool should_save_state () const { return !(_flags & DoNotSaveState); }; - void freeze (); void thaw (const std::string& why); diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 3f75cc57b7..8f8a84f321 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -38,8 +38,8 @@ class PeakMeter; class Return : public IOProcessor { public: - Return (Session&); - Return (Session&, const XMLNode&); + Return (Session&, bool internal = false); + Return (Session&, const XMLNode&, bool internal = false); virtual ~Return (); uint32_t bit_slot() const { return _bitslot; } diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 2a3580b187..339f18ef3f 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -52,6 +52,7 @@ class Panner; class Processor; class RouteGroup; class Send; +class InternalReturn; class Route : public SessionObject, public AutomatableControls { @@ -183,18 +184,17 @@ class Route : public SessionObject, public AutomatableControls } } - ProcessorList::iterator prefader_iterator(); - ChanCount max_processor_streams () const { return processor_max_streams; } - ChanCount pre_fader_streams() const; /* special processors */ - boost::shared_ptr<Delivery> control_outs() const { return _control_outs; } - boost::shared_ptr<Delivery> main_outs() const { return _main_outs; } - - boost::shared_ptr<Send> send_for (boost::shared_ptr<const IO> target) const; - + boost::shared_ptr<Delivery> control_outs() const { return _control_outs; } + boost::shared_ptr<Delivery> main_outs() const { return _main_outs; } + boost::shared_ptr<InternalReturn> internal_return() const { return _intreturn; } + boost::shared_ptr<Send> internal_send_for (boost::shared_ptr<const Route> target) const; + BufferSet* get_return_buffer () const; + void release_return_buffer () const; + /** A record of the stream configuration at some point in the processor list. * Used to return where and why an processor list configuration request failed. */ @@ -262,10 +262,10 @@ class Route : public SessionObject, public AutomatableControls sigc::signal<void,void*> SelectedChanged; - int listen_via (boost::shared_ptr<IO>, const std::string& name); - void drop_listen (boost::shared_ptr<IO>); + int listen_via (boost::shared_ptr<Route>, const std::string& name); + void drop_listen (boost::shared_ptr<Route>); - bool feeds (boost::shared_ptr<IO>); + bool feeds (boost::shared_ptr<Route>); std::set<boost::shared_ptr<Route> > fed_by; /* Controls (not all directly owned by the Route */ @@ -341,6 +341,7 @@ class Route : public SessionObject, public AutomatableControls mutable Glib::RWLock _processor_lock; boost::shared_ptr<Delivery> _main_outs; boost::shared_ptr<Delivery> _control_outs; // XXX to be removed/generalized by listen points + boost::shared_ptr<InternalReturn> _intreturn; Flag _flags; int _pending_declick; @@ -381,8 +382,6 @@ class Route : public SessionObject, public AutomatableControls virtual int _set_state (const XMLNode&, bool call_base); - boost::shared_ptr<Delivery> add_listener (boost::shared_ptr<IO>, const std::string&); - boost::shared_ptr<Amp> _amp; boost::shared_ptr<PeakMeter> _meter; sigc::connection _meter_connection; diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 3a0eae21e5..37d56e2abd 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -37,8 +37,8 @@ class Amp; class Send : public Delivery { public: - Send (Session&, boost::shared_ptr<MuteMaster>); - Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&); + Send (Session&, boost::shared_ptr<MuteMaster>, bool internal = false); + Send (Session&, boost::shared_ptr<MuteMaster>, const XMLNode&, bool internal = false); virtual ~Send (); uint32_t bit_slot() const { return _bitslot; } diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 2e161ff776..e970d6e9e4 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -747,12 +747,6 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable boost::shared_ptr<Route> control_out() const { return _control_out; } boost::shared_ptr<Route> master_out() const { return _master_out; } - /* insert/send management */ - - uint32_t n_port_inserts() const { return _port_inserts.size(); } - uint32_t n_plugin_inserts() const { return _plugin_inserts.size(); } - uint32_t n_sends() const { return _sends.size(); } - static void set_disable_all_loaded_plugins (bool yn) { _disable_all_loaded_plugins = yn; } @@ -1558,16 +1552,9 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* INSERT AND SEND MANAGEMENT */ - std::list<PortInsert *> _port_inserts; - std::list<PluginInsert *> _plugin_inserts; - std::list<Send *> _sends; - std::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; - void add_processor (Processor *); void remove_processor (Processor *); |