mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
prepare_input/cycle_start fix up round 2 (torben's location); torben's fix for autoconnect
git-svn-id: svn://localhost/ardour2/branches/3.0@3822 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
43b17b5df1
commit
edbe4a3307
3 changed files with 11 additions and 39 deletions
|
|
@ -324,6 +324,7 @@ IO::collect_input (BufferSet& outs, nframes_t nframes, nframes_t offset)
|
|||
|
||||
BufferSet::iterator o = outs.begin(*t);
|
||||
for (PortSet::iterator i = _inputs.begin(*t); i != _inputs.end(*t); ++i, ++o) {
|
||||
(*i)->prepare_inputs (nframes, offset);
|
||||
o->read_from(i->get_buffer(), nframes, offset);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1527,16 +1527,13 @@ Session::new_midi_track (TrackMode mode, uint32_t how_many)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
vector<string> physinputs;
|
||||
vector<string> physoutputs;
|
||||
|
||||
_engine.get_physical_outputs (DataType::MIDI, physoutputs);
|
||||
_engine.get_physical_inputs (DataType::MIDI, physinputs);
|
||||
uint32_t nphysical_in;
|
||||
uint32_t nphysical_out;
|
||||
|
||||
control_id = ntracks() + nbusses();
|
||||
#endif
|
||||
|
||||
while (how_many) {
|
||||
|
||||
|
|
@ -1558,20 +1555,6 @@ Session::new_midi_track (TrackMode mode, uint32_t how_many)
|
|||
|
||||
} while (track_id < (UINT_MAX-1));
|
||||
|
||||
/*
|
||||
if (Config->get_input_auto_connect() & AutoConnectPhysical) {
|
||||
nphysical_in = min (n_physical_inputs, (uint32_t) physinputs.size());
|
||||
} else {
|
||||
nphysical_in = 0;
|
||||
}
|
||||
|
||||
if (Config->get_output_auto_connect() & AutoConnectPhysical) {
|
||||
nphysical_out = min (n_physical_outputs, (uint32_t) physinputs.size());
|
||||
} else {
|
||||
nphysical_out = 0;
|
||||
}
|
||||
*/
|
||||
|
||||
shared_ptr<MidiTrack> track;
|
||||
|
||||
try {
|
||||
|
|
@ -1704,8 +1687,6 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
|
|||
|
||||
vector<string> physinputs;
|
||||
vector<string> physoutputs;
|
||||
uint32_t nphysical_in;
|
||||
uint32_t nphysical_out;
|
||||
|
||||
_engine.get_physical_outputs (DataType::AUDIO, physoutputs);
|
||||
_engine.get_physical_inputs (DataType::AUDIO, physinputs);
|
||||
|
|
@ -1731,18 +1712,6 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
|
|||
|
||||
} while (track_id < (UINT_MAX-1));
|
||||
|
||||
if (Config->get_input_auto_connect() & AutoConnectPhysical) {
|
||||
nphysical_in = min (n_physical_inputs, (uint32_t) physinputs.size());
|
||||
} else {
|
||||
nphysical_in = 0;
|
||||
}
|
||||
|
||||
if (Config->get_output_auto_connect() & AutoConnectPhysical) {
|
||||
nphysical_out = min (n_physical_outputs, (uint32_t) physinputs.size());
|
||||
} else {
|
||||
nphysical_out = 0;
|
||||
}
|
||||
|
||||
shared_ptr<AudioTrack> track;
|
||||
|
||||
try {
|
||||
|
|
@ -1770,7 +1739,7 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
|
|||
}
|
||||
}
|
||||
|
||||
for (uint32_t x = 0; x < track->n_outputs().n_midi(); ++x) {
|
||||
for (uint32_t x = 0; x < track->n_outputs().n_audio(); ++x) {
|
||||
|
||||
port = "";
|
||||
|
||||
|
|
@ -1872,6 +1841,7 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
|
|||
char bus_name[32];
|
||||
uint32_t bus_id = 1;
|
||||
uint32_t n = 0;
|
||||
uint32_t channels_used = 0;
|
||||
string port;
|
||||
RouteList ret;
|
||||
uint32_t control_id;
|
||||
|
|
@ -1882,9 +1852,12 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
|
|||
shared_ptr<RouteList> r = routes.reader ();
|
||||
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
if (dynamic_cast<AudioTrack*>((*i).get()) == 0) {
|
||||
if (boost::dynamic_pointer_cast<Track*>(*i) == 0) {
|
||||
/* its a bus ? */
|
||||
if (!(*i)->is_hidden() && (*i)->name() != _("master")) {
|
||||
bus_id++;
|
||||
n++;
|
||||
channels_used += (*i)->n_inputs().n_audio();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1933,7 +1906,7 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
|
|||
}
|
||||
}
|
||||
|
||||
for (uint32_t x = 0; n_physical_outputs && x < bus->n_outputs().n_audio(); ++x) {
|
||||
for (uint32_t x = 0; x < bus->n_outputs().n_audio(); ++x) {
|
||||
|
||||
port = "";
|
||||
|
||||
|
|
@ -1950,6 +1923,8 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
|
|||
}
|
||||
}
|
||||
|
||||
channels_used += bus->n_inputs ().n_audio();
|
||||
|
||||
bus->set_remote_control_id (control_id);
|
||||
++control_id;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,8 +103,6 @@ Session::no_roll (nframes_t nframes, nframes_t offset)
|
|||
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
|
||||
(*i)->prepare_inputs (nframes, offset);
|
||||
|
||||
if ((*i)->is_hidden()) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -144,8 +142,6 @@ Session::process_routes (nframes_t nframes, nframes_t offset)
|
|||
|
||||
int ret;
|
||||
|
||||
(*i)->prepare_inputs (nframes, offset);
|
||||
|
||||
if ((*i)->is_hidden()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue