diff options
author | Hans Fugal <hans@fugal.net> | 2006-08-09 21:31:36 +0000 |
---|---|---|
committer | Hans Fugal <hans@fugal.net> | 2006-08-09 21:31:36 +0000 |
commit | a160eb92db7fafff70dbe09d5f007b265b4f5efb (patch) | |
tree | 7b966165d676c3d61c1d821f6bae3afcec9606e7 /libs | |
parent | c26215c1e59b6341da86f94f5b2b3ca950dd3889 (diff) |
merge from trunk
git-svn-id: svn://localhost/ardour2/branches/undo@773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/audio_unit.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/tempo.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/track.h | 2 | ||||
-rw-r--r-- | libs/ardour/audio_unit.cc | 8 | ||||
-rw-r--r-- | libs/ardour/io.cc | 2 | ||||
-rw-r--r-- | libs/ardour/track.cc | 20 |
7 files changed, 35 insertions, 5 deletions
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 63522d8d5c..1c8d6cbc2d 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -35,6 +35,7 @@ class CAComponent; class CAAudioUnit; class CAComponentDescription; +struct AudioBufferList; namespace ARDOUR { @@ -89,6 +90,9 @@ class AUPlugin : public ARDOUR::Plugin CAComponent* comp; CAAudioUnit* unit; + AudioBufferList* in_list; + AudioBufferList* out_list; + std::vector<std::pair<uint32_t, uint32_t> > parameter_map; }; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 8271c1cf6a..d1db818e40 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -97,7 +97,7 @@ class Route : public IO virtual int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset, bool can_record, bool rec_monitors_input); virtual void toggle_monitor_input (); - virtual bool can_record() const { return false; } + virtual bool can_record() { return false; } virtual void set_record_enable (bool yn, void *src) {} virtual bool record_enabled() const { return false; } virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_redirects); diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index c4032b9ed9..bfd3e429c3 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -238,7 +238,7 @@ class TempoMap : public Stateful, public StateManager { XMLNode& get_state (void); int set_state (const XMLNode&); - PBD::ID id(); + PBD::ID id() { return _id; } void dump (std::ostream&) const; void clear (); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index f16e9d29d9..4e2af5c80e 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -48,7 +48,7 @@ class Track : public Route void toggle_monitor_input (); - bool can_record() const { return true; } + virtual bool can_record(); Diskstream& diskstream() const { return *_diskstream; } diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 59797f3288..25c8aeb53b 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -64,6 +64,14 @@ AUPlugin::~AUPlugin () if (comp) { delete comp; } + + if (in_list) { + delete in_list; + } + + if (out_list) { + delete out_list; + } } AUPluginInfo::~AUPluginInfo () diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 2dfd735a6b..4d2d26f801 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -170,7 +170,7 @@ IO::silence (jack_nframes_t nframes, jack_nframes_t offset) void IO::apply_declick (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, gain_t initial, gain_t target, bool invert_polarity) { - jack_nframes_t declick = min ((jack_nframes_t)4096, nframes); + jack_nframes_t declick = min ((jack_nframes_t)128, nframes); gain_t delta; Sample *buffer; double fractional_shift; diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 709e76f5e1..941524b54c 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -31,6 +31,7 @@ #include <ardour/audioplaylist.h> #include <ardour/panner.h> #include <ardour/utils.h> +#include <ardour/connection.h> #include "i18n.h" @@ -146,6 +147,18 @@ Track::record_enabled () const { return _diskstream->record_enabled (); } + +bool +Track::can_record() +{ + bool will_record = true; + for (int i = 0; i < _inputs.size() && will_record; i++) { + if (!_inputs[i]->connected()) + will_record = false; + } + + return will_record; +} void Track::set_record_enable (bool yn, void *src) @@ -159,8 +172,13 @@ Track::set_record_enable (bool yn, void *src) return; } - /* keep track of the meter point as it was before we rec-enabled */ + // Do not set rec enabled if the track can't record. + if (yn && !can_record()) { + error << string_compose( _("Can not arm track '%1'. Check the input connections"), name() ) << endmsg; + return; + } + /* keep track of the meter point as it was before we rec-enabled */ if (!_diskstream->record_enabled()) { _saved_meter_point = _meter_point; } |