mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-24 06:07:29 +01:00
finish commit from yesterday ... sorry folks
git-svn-id: svn://localhost/ardour2/branches/3.0@6786 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
40f93ba6e0
commit
b5c21e65fc
12 changed files with 58 additions and 80 deletions
|
|
@ -1323,18 +1323,6 @@ ARDOUR_UI::session_add_audio_route (bool track, bool aux, int32_t input_channels
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if CONTROLOUTS
|
||||
if (need_control_room_outs) {
|
||||
pan_t pans[2];
|
||||
|
||||
pans[0] = 0.5;
|
||||
pans[1] = 0.5;
|
||||
|
||||
route->set_stereo_control_outs (control_lr_channels);
|
||||
route->control_outs()->set_stereo_pan (pans, this);
|
||||
}
|
||||
#endif /* CONTROLOUTS */
|
||||
}
|
||||
|
||||
catch (...) {
|
||||
|
|
@ -2272,62 +2260,49 @@ ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path
|
|||
int
|
||||
ARDOUR_UI::build_session_from_nsd (const Glib::ustring& session_path, const Glib::ustring& session_name)
|
||||
{
|
||||
|
||||
uint32_t mchns;
|
||||
AutoConnectOption iconnect;
|
||||
AutoConnectOption oconnect;
|
||||
uint32_t nphysin;
|
||||
uint32_t nphysout;
|
||||
BusProfile bus_profile;
|
||||
|
||||
if (Profile->get_sae()) {
|
||||
|
||||
mchns = 2;
|
||||
iconnect = AutoConnectPhysical;
|
||||
oconnect = AutoConnectMaster;
|
||||
nphysin = 0; // use all available
|
||||
nphysout = 0; // use all available
|
||||
bus_profile.master_out_channels = 2;
|
||||
bus_profile.input_ac = AutoConnectPhysical;
|
||||
bus_profile.output_ac = AutoConnectMaster;
|
||||
bus_profile.requested_physical_in = 0; // use all available
|
||||
bus_profile.requested_physical_out = 0; // use all available
|
||||
|
||||
} else {
|
||||
|
||||
/* get settings from advanced section of NSD */
|
||||
|
||||
if (_startup->create_master_bus()) {
|
||||
mchns = (uint32_t) _startup->master_channel_count();
|
||||
bus_profile.master_out_channels = (uint32_t) _startup->master_channel_count();
|
||||
} else {
|
||||
mchns = 0;
|
||||
bus_profile.master_out_channels = 0;
|
||||
}
|
||||
|
||||
if (_startup->connect_inputs()) {
|
||||
iconnect = AutoConnectPhysical;
|
||||
bus_profile.input_ac = AutoConnectPhysical;
|
||||
} else {
|
||||
iconnect = AutoConnectOption (0);
|
||||
bus_profile.input_ac = AutoConnectOption (0);
|
||||
}
|
||||
|
||||
/// @todo some minor tweaks.
|
||||
|
||||
oconnect = AutoConnectOption (0);
|
||||
|
||||
bus_profile.output_ac = AutoConnectOption (0);
|
||||
|
||||
if (_startup->connect_outputs ()) {
|
||||
if (_startup->connect_outs_to_master()) {
|
||||
oconnect = AutoConnectMaster;
|
||||
bus_profile.output_ac = AutoConnectMaster;
|
||||
} else if (_startup->connect_outs_to_physical()) {
|
||||
oconnect = AutoConnectPhysical;
|
||||
bus_profile.output_ac = AutoConnectPhysical;
|
||||
}
|
||||
}
|
||||
|
||||
nphysin = (uint32_t) _startup->input_limit_count();
|
||||
nphysout = (uint32_t) _startup->output_limit_count();
|
||||
bus_profile.requested_physical_in = (uint32_t) _startup->input_limit_count();
|
||||
bus_profile.requested_physical_out = (uint32_t) _startup->output_limit_count();
|
||||
}
|
||||
|
||||
if (build_session (session_path,
|
||||
session_name,
|
||||
mchns,
|
||||
iconnect,
|
||||
oconnect,
|
||||
nphysin,
|
||||
nphysout,
|
||||
engine->frame_rate() * 60 * 5)) {
|
||||
|
||||
if (build_session (session_path, session_name, bus_profile)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -2557,7 +2532,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
|
|||
loading_message (string_compose (_("Please wait while %1loads your session"), PROGRAM_NAME));
|
||||
|
||||
try {
|
||||
new_session = new Session (*engine, path, snap_name, mix_template);
|
||||
new_session = new Session (*engine, path, snap_name, 0, mix_template);
|
||||
}
|
||||
|
||||
/* this one is special */
|
||||
|
|
@ -2632,13 +2607,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
|
|||
}
|
||||
|
||||
int
|
||||
ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_name,
|
||||
uint32_t master_channels,
|
||||
AutoConnectOption input_connect,
|
||||
AutoConnectOption output_connect,
|
||||
uint32_t nphysin,
|
||||
uint32_t nphysout,
|
||||
nframes_t initial_length)
|
||||
ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_name, BusProfile& bus_profile)
|
||||
{
|
||||
Session *new_session;
|
||||
int x;
|
||||
|
|
@ -2660,8 +2629,7 @@ ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_n
|
|||
_session_is_new = true;
|
||||
|
||||
try {
|
||||
new_session = new Session (*engine, path, snap_name, input_connect, output_connect,
|
||||
master_channels, nphysin, nphysout, initial_length);
|
||||
new_session = new Session (*engine, path, snap_name, &bus_profile);
|
||||
}
|
||||
|
||||
catch (...) {
|
||||
|
|
|
|||
|
|
@ -124,13 +124,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
|
||||
bool session_loaded;
|
||||
int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
|
||||
uint32_t master_chns,
|
||||
ARDOUR::AutoConnectOption input_connect,
|
||||
ARDOUR::AutoConnectOption output_connect,
|
||||
uint32_t nphysin,
|
||||
uint32_t nphysout,
|
||||
nframes_t initial_length);
|
||||
int build_session (const Glib::ustring& path, const Glib::ustring& snapshot, ARDOUR::BusProfile&);
|
||||
bool session_is_new() const { return _session_is_new; }
|
||||
|
||||
ARDOUR::Session* the_session() { return _session; }
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false);
|
||||
}
|
||||
|
||||
if (!_session->control_out()) {
|
||||
if (!_session->monitor_out()) {
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), X_("SoloViaBus"));
|
||||
if (act) {
|
||||
act->set_sensitive (false);
|
||||
|
|
|
|||
|
|
@ -4831,7 +4831,7 @@ Editor::handle_new_route (RouteList& routes)
|
|||
for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
|
||||
boost::shared_ptr<Route> route = (*x);
|
||||
|
||||
if (route->is_hidden() || route->is_control()) {
|
||||
if (route->is_hidden() || route->is_monitor()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ MixerGroupTabs::compute_tabs () const
|
|||
|
||||
MixerStrip* s = (*i)[_mixer->track_columns.strip];
|
||||
|
||||
if (s->route()->is_master() || s->route()->is_control() || !s->marked_for_display()) {
|
||||
if (s->route()->is_master() || s->route()->is_monitor() || !s->marked_for_display()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ MixerGroupTabs::routes_for_tab (Tab const * t) const
|
|||
|
||||
MixerStrip* s = (*i)[_mixer->track_columns.strip];
|
||||
|
||||
if (s->route()->is_master() || s->route()->is_control() || !s->marked_for_display()) {
|
||||
if (s->route()->is_master() || s->route()->is_monitor() || !s->marked_for_display()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
solo_button->show ();
|
||||
}
|
||||
|
||||
if (_mixer_owned && (route()->is_master() || route()->is_control())) {
|
||||
if (_mixer_owned && (route()->is_master() || route()->is_monitor())) {
|
||||
|
||||
if (scrollbar_height == 0) {
|
||||
HScrollbar scrollbar;
|
||||
|
|
@ -448,7 +448,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
|
||||
processor_box.show();
|
||||
|
||||
if (!route()->is_master() && !route()->is_control()) {
|
||||
if (!route()->is_master() && !route()->is_monitor()) {
|
||||
/* we don't allow master or control routes to be hidden */
|
||||
hide_button.show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ Mixer_UI::add_strip (RouteList& routes)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (route->is_control()) {
|
||||
if (route->is_monitor()) {
|
||||
if (!_monitor_section) {
|
||||
_monitor_section = new MonitorSection (_session);
|
||||
out_packer.pack_end (_monitor_section->tearoff(), false, false);
|
||||
|
|
@ -624,7 +624,7 @@ Mixer_UI::set_all_strips_visibility (bool yn)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_control()) {
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -652,7 +652,7 @@ Mixer_UI::set_all_audio_visibility (int tracks, bool yn)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_control()) {
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -775,7 +775,7 @@ Mixer_UI::redisplay_track_list ()
|
|||
|
||||
if (strip->packed()) {
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_control()) {
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
out_packer.reorder_child (*strip, -1);
|
||||
} else {
|
||||
strip_packer.reorder_child (*strip, -1); /* put at end */
|
||||
|
|
@ -783,7 +783,7 @@ Mixer_UI::redisplay_track_list ()
|
|||
|
||||
} else {
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_control()) {
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
out_packer.pack_start (*strip, false, false);
|
||||
} else {
|
||||
strip_packer.pack_start (*strip, false, false);
|
||||
|
|
@ -796,7 +796,7 @@ Mixer_UI::redisplay_track_list ()
|
|||
|
||||
strip->set_marked_for_display (false);
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_control()) {
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
/* do nothing, these cannot be hidden */
|
||||
} else {
|
||||
if (strip->packed()) {
|
||||
|
|
@ -994,7 +994,7 @@ Mixer_UI::track_display_button_press (GdkEventButton* ev)
|
|||
MixerStrip* strip = (*iter)[track_columns.strip];
|
||||
if (strip) {
|
||||
|
||||
if (!strip->route()->is_master() && !strip->route()->is_control()) {
|
||||
if (!strip->route()->is_master() && !strip->route()->is_monitor()) {
|
||||
bool visible = (*iter)[track_columns.visible];
|
||||
(*iter)[track_columns.visible] = !visible;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ MonitorSection::set_session (Session* s)
|
|||
|
||||
if (_session) {
|
||||
|
||||
_route = _session->control_out ();
|
||||
_route = _session->monitor_out ();
|
||||
|
||||
if (_route) {
|
||||
/* session with control outs */
|
||||
|
|
|
|||
|
|
@ -785,7 +785,7 @@ RouteTimeAxisView::set_height (uint32_t h)
|
|||
|
||||
gm.get_gain_slider().show();
|
||||
mute_button->show();
|
||||
if (!_route || _route->is_control()) {
|
||||
if (!_route || _route->is_monitor()) {
|
||||
solo_button->hide();
|
||||
} else {
|
||||
solo_button->show();
|
||||
|
|
@ -811,7 +811,7 @@ RouteTimeAxisView::set_height (uint32_t h)
|
|||
|
||||
gm.get_gain_slider().hide();
|
||||
mute_button->show();
|
||||
if (!_route || _route->is_control()) {
|
||||
if (!_route || _route->is_monitor()) {
|
||||
solo_button->hide();
|
||||
} else {
|
||||
solo_button->show();
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
|
||||
mute_button->show();
|
||||
|
||||
if (_route->is_control()) {
|
||||
if (_route->is_monitor()) {
|
||||
solo_button->hide ();
|
||||
} else {
|
||||
solo_button->show();
|
||||
|
|
@ -677,7 +677,7 @@ RouteUI::listen_changed(void* /*src*/)
|
|||
int
|
||||
RouteUI::solo_visual_state (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_control()) {
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -701,7 +701,7 @@ RouteUI::solo_visual_state (boost::shared_ptr<Route> r)
|
|||
int
|
||||
RouteUI::solo_visual_state_with_isolate (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_control()) {
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -727,7 +727,7 @@ RouteUI::solo_visual_state_with_isolate (boost::shared_ptr<Route> r)
|
|||
int
|
||||
RouteUI::solo_isolate_visual_state (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_control()) {
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -779,7 +779,7 @@ RouteUI::mute_changed(void* /*src*/)
|
|||
int
|
||||
RouteUI::mute_visual_state (Session* s, boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_control()) {
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -561,6 +561,13 @@ ArdourStartup::populate_session_templates ()
|
|||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
lost_name_entry_focus (GdkEventFocus* ev)
|
||||
{
|
||||
cerr << "lost focus\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ArdourStartup::setup_new_session_page ()
|
||||
{
|
||||
|
|
@ -711,6 +718,14 @@ ArdourStartup::setup_new_session_page ()
|
|||
set_page_title (session_vbox, _("New Session"));
|
||||
set_page_type (session_vbox, ASSISTANT_PAGE_CONFIRM);
|
||||
|
||||
new_name_entry.signal_map().connect (sigc::mem_fun (*this, &ArdourStartup::new_name_mapped));
|
||||
new_name_entry.signal_focus_out_event().connect (sigc::ptr_fun (lost_name_entry_focus));
|
||||
}
|
||||
|
||||
void
|
||||
ArdourStartup::new_name_mapped ()
|
||||
{
|
||||
cerr << "Grab new name focus\n";
|
||||
new_name_entry.grab_focus ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ class ArdourStartup : public Gtk::Assistant {
|
|||
Gtk::Entry new_name_entry;
|
||||
Gtk::FileChooserButton new_folder_chooser;
|
||||
Gtk::FileChooserButton session_template_chooser;
|
||||
void new_name_mapped ();
|
||||
|
||||
struct SessionTemplateColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
SessionTemplateColumns () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue