Adding sends/port inserts to MIDI tracks (not actually working yet though)
git-svn-id: svn://localhost/ardour2/branches/midi@877 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5169a66f35
commit
0c3d8378f3
|
@ -448,6 +448,7 @@ void
|
|||
RedirectBox::choose_send ()
|
||||
{
|
||||
boost::shared_ptr<Send> send (new Send (_session, _placement));
|
||||
send->set_default_type(_route->default_type());
|
||||
|
||||
/* XXX need redirect lock on route */
|
||||
|
||||
|
|
|
@ -94,7 +94,8 @@ class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
|
|||
void set_output_minimum (int n);
|
||||
void set_output_maximum (int n);
|
||||
|
||||
DataType default_type() const { return _default_type; }
|
||||
DataType default_type() const { return _default_type; }
|
||||
void set_default_type(DataType t) { _default_type = t; }
|
||||
|
||||
const string& name() const { return _name; }
|
||||
virtual int set_name (string str, void *src);
|
||||
|
|
|
@ -106,14 +106,27 @@ IO::IO (Session& s, string name,
|
|||
_default_type(default_type),
|
||||
_gain_control (*this),
|
||||
_gain_automation_curve (0.0, 2.0, 1.0),
|
||||
_input_minimum (_default_type, input_min),
|
||||
_input_maximum (_default_type, input_max),
|
||||
_output_minimum (_default_type, output_min),
|
||||
_output_maximum (_default_type, output_max)
|
||||
_input_minimum (ChanCount::ZERO),
|
||||
_input_maximum (ChanCount::INFINITE),
|
||||
_output_minimum (ChanCount::ZERO),
|
||||
_output_maximum (ChanCount::INFINITE)
|
||||
{
|
||||
_panner = new Panner (name, _session);
|
||||
_meter = new PeakMeter (_session);
|
||||
|
||||
if (input_min > 0) {
|
||||
_input_minimum = ChanCount(_default_type, input_min);
|
||||
}
|
||||
if (input_max >= 0) {
|
||||
_input_maximum = ChanCount(_default_type, input_max);
|
||||
}
|
||||
if (output_min > 0) {
|
||||
_output_minimum = ChanCount(_default_type, output_min);
|
||||
}
|
||||
if (output_max >= 0) {
|
||||
_output_maximum = ChanCount(_default_type, output_max);
|
||||
}
|
||||
|
||||
_gain = 1.0;
|
||||
_desired_gain = 1.0;
|
||||
_input_connection = 0;
|
||||
|
|
|
@ -61,6 +61,11 @@ PeakMeter::setup (const ChanCount& in)
|
|||
{
|
||||
uint32_t limit = in.get(DataType::AUDIO);
|
||||
|
||||
while (_peak_power.size() > limit) {
|
||||
_peak_power.pop_back();
|
||||
_visible_peak_power.pop_back();
|
||||
}
|
||||
|
||||
while (_peak_power.size() < limit) {
|
||||
_peak_power.push_back (0);
|
||||
_visible_peak_power.push_back (0);
|
||||
|
|
|
@ -45,8 +45,8 @@ const string Redirect::state_node_name = "Redirect";
|
|||
sigc::signal<void,Redirect*> Redirect::RedirectCreated;
|
||||
|
||||
Redirect::Redirect (Session& s, const string& name, Placement p,
|
||||
|
||||
int input_min, int input_max, int output_min, int output_max)
|
||||
int input_min, int input_max,
|
||||
int output_min, int output_max)
|
||||
: IO (s, name, input_min, input_max, output_min, output_max)
|
||||
{
|
||||
_placement = p;
|
||||
|
|
|
@ -759,6 +759,8 @@ Route::add_redirect (boost::shared_ptr<Redirect> redirect, void *src, uint32_t*
|
|||
boost::shared_ptr<PluginInsert> pi;
|
||||
boost::shared_ptr<PortInsert> porti;
|
||||
|
||||
redirect->set_default_type(_default_type);
|
||||
|
||||
ChanCount potential_max_streams;
|
||||
|
||||
if ((pi = boost::dynamic_pointer_cast<PluginInsert>(redirect)) != 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user