merge from trunk

git-svn-id: svn://localhost/ardour2/branches/undo@773 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Fugal 2006-08-09 21:31:36 +00:00
parent c26215c1e5
commit a160eb92db
16 changed files with 171 additions and 135 deletions

View file

@ -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;
};

View file

@ -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);

View file

@ -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 ();

View file

@ -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; }

View file

@ -64,6 +64,14 @@ AUPlugin::~AUPlugin ()
if (comp) {
delete comp;
}
if (in_list) {
delete in_list;
}
if (out_list) {
delete out_list;
}
}
AUPluginInfo::~AUPluginInfo ()

View file

@ -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;

View file

@ -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;
}