diff options
-rw-r--r-- | gtk2_ardour/about.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/po/de.po | 4 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 33 | ||||
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/system_exec.cc | 42 | ||||
-rw-r--r-- | gtk2_ardour/video_timeline.cc | 57 | ||||
-rw-r--r-- | gtk2_ardour/window_manager.cc | 9 | ||||
-rw-r--r-- | libs/ardour/butler.cc | 3 | ||||
-rw-r--r-- | libs/ardour/rdff.c | 2 | ||||
-rw-r--r-- | libs/midi++2/ipmidi_port.cc | 4 | ||||
-rw-r--r-- | libs/pbd/controllable_descriptor.cc | 3 | ||||
-rw-r--r-- | libs/pbd/crossthread.cc | 2 | ||||
-rw-r--r-- | libs/pbd/file_manager.cc | 3 | ||||
-rw-r--r-- | libs/pbd/sndfile_manager.cc | 11 | ||||
-rw-r--r-- | libs/surfaces/osc/osc.cc | 87 | ||||
-rw-r--r-- | libs/surfaces/osc/osc.h | 4 | ||||
-rw-r--r-- | tools/linux_packaging/noderun | 2 | ||||
-rw-r--r-- | wscript | 9 |
18 files changed, 221 insertions, 66 deletions
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc index db721b6441..280f72a8dc 100644 --- a/gtk2_ardour/about.cc +++ b/gtk2_ardour/about.cc @@ -591,6 +591,11 @@ About::About () get_action_area()->add (*config_button); get_action_area()->reorder_child (*config_button, 0); config_button->signal_clicked().connect (mem_fun (*this, &About::show_config_info)); + + Gtk::Button *btn = static_cast<Gtk::Button*>(get_widget_for_response(Gtk::RESPONSE_CANCEL)); + if (btn) { + btn->signal_clicked().connect(sigc::mem_fun(static_cast<Gtk::Window*>(this), &Gtk::Window::hide)); + } } About::~About () diff --git a/gtk2_ardour/po/de.po b/gtk2_ardour/po/de.po index 6706ab9102..3875319835 100644 --- a/gtk2_ardour/po/de.po +++ b/gtk2_ardour/po/de.po @@ -269,7 +269,7 @@ msgid "" "\tBenjamin Scherrer <realhangman@web.de>\n" "\tEdgar Aichinger <edogawa@aon.at>\n" "\tRichard Oax <richard@pagliacciempire.de>\n" -"\Robin Gloster <robin@loc-com.de>\n" +"\tRobin Gloster <robin@loc-com.de>\n" msgstr "" "Deutsch:\n" "\tKarsten Petersen <kapet@kapet.de>\n" @@ -278,7 +278,7 @@ msgstr "" "\tBenjamin Scherrer <realhangman@web.de>\n" "\tEdgar Aichinger <edogawa@aon.at>\n" "\tRichard Oax <richard@pagliacciempire.de>\n" -"\Robin Gloster <robin@loc-com.de>\n" +"\tRobin Gloster <robin@loc-com.de>\n" #: about.cc:189 msgid "" diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 2f8513fd2a..bae29ae98a 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -113,7 +113,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo _button.set_active (_processor->active()); _button.show (); - + _processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context()); _processor->PropertyChanged.connect (name_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context()); @@ -247,7 +247,20 @@ ProcessorEntry::processor_property_changed (const PropertyChange& what_changed) void ProcessorEntry::setup_tooltip () { - ARDOUR_UI::instance()->set_tip (_button, name (Wide)); + if (_processor) { + boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (_processor); + if (pi) { + if (pi->plugin()->has_editor()) { + ARDOUR_UI::instance()->set_tip (_button, + string_compose (_("<b>%1</b>\nDouble-click to show GUI.\nAlt+double-click to show generic GUI."), name (Wide))); + } else { + ARDOUR_UI::instance()->set_tip (_button, + string_compose (_("<b>%1</b>\nDouble-click to show generic GUI."), name (Wide))); + } + return; + } + } + ARDOUR_UI::instance()->set_tip (_button, string_compose ("<b>%1</b>", name (Wide))); } string @@ -918,6 +931,7 @@ ProcessorBox::show_processor_menu (int arg) const bool sensitive = !processor_display.selection().empty(); ActionManager::set_sensitive (ActionManager::plugin_selection_sensitive_actions, sensitive); edit_action->set_sensitive (one_processor_can_be_edited ()); + edit_generic_action->set_sensitive (one_processor_can_be_edited ()); boost::shared_ptr<PluginInsert> pi; if (single_selection) { @@ -925,7 +939,7 @@ ProcessorBox::show_processor_menu (int arg) } /* allow editing with an Ardour-generated UI for plugin inserts with editors */ - edit_generic_action->set_sensitive (pi && pi->plugin()->has_editor ()); + edit_action->set_sensitive (pi && pi->plugin()->has_editor ()); /* disallow rename for multiple selections, for plugin inserts and for the fader */ rename_action->set_sensitive (single_selection && !pi && !boost::dynamic_pointer_cast<Amp> (single_selection->processor ())); @@ -1050,13 +1064,14 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry* if (processor && (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS))) { if (_session->engine().connected()) { - /* XXX giving an error message here is hard, because we may be in the midst of a button press */ - if (Config->get_use_plugin_own_gui ()) { - edit_processor (processor); - } else { + if (!one_processor_can_be_edited ()) return true; + + if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) { generic_edit_processor (processor); + } else { + edit_processor (processor); } } @@ -2235,7 +2250,7 @@ ProcessorBox::register_actions () sigc::ptr_fun (ProcessorBox::rb_edit)); edit_generic_action = ActionManager::register_action ( - popup_act_grp, X_("edit-generic"), _("Edit with basic controls..."), + popup_act_grp, X_("edit-generic"), _("Edit with generic controls..."), sigc::ptr_fun (ProcessorBox::rb_edit_generic)); ActionManager::add_action_group (popup_act_grp); @@ -2437,7 +2452,7 @@ ProcessorBox::edit_processor (boost::shared_ptr<Processor> processor) ProcessorWindowProxy* proxy = find_window_proxy (processor); if (proxy) { - proxy->set_custom_ui_mode (Config->get_use_plugin_own_gui ()); + proxy->set_custom_ui_mode (true); proxy->toggle (); } } diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 216a122e91..da0e55c7a2 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1855,13 +1855,6 @@ RCOptionEditor::RCOptionEditor () /* font scaling does nothing with GDK/Quartz */ add_option (S_("Preferences|GUI"), new FontScalingOptions (_rc_config)); #endif - add_option (S_("Preferences|GUI"), - new BoolOption ( - "use-own-plugin-gui", - string_compose (_("Use plugins' own interfaces instead of %1's"), PROGRAM_NAME), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_plugin_own_gui), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_plugin_own_gui) - )); add_option (S_("GUI"), new BoolOption ( diff --git a/gtk2_ardour/system_exec.cc b/gtk2_ardour/system_exec.cc index 566c87dfbb..c63d1d183b 100644 --- a/gtk2_ardour/system_exec.cc +++ b/gtk2_ardour/system_exec.cc @@ -414,19 +414,33 @@ void SystemExec::terminate () { ::pthread_mutex_lock(&write_lock); + + /* close stdin in an attempt to get the child to exit cleanly. + */ + close_stdin(); + if (pid) { ::usleep(50000); sched_yield(); wait(WNOHANG); } + /* if pid is non-zero, the child task is still executing (i.e. it did + * not exit in response to stdin being closed). try to kill it. + */ + if (pid) { ::kill(pid, SIGTERM); ::usleep(50000); sched_yield(); wait(WNOHANG); } + + /* if pid is non-zero, the child task is STILL executing after being + * sent SIGTERM. Act tough ... send SIGKILL + */ + if (pid) { ::fprintf(stderr, "Process is still running! trying SIGKILL\n"); ::kill(pid, SIGKILL); @@ -442,12 +456,23 @@ int SystemExec::wait (int options) { int status=0; + int ret; + if (pid==0) return -1; - if (pid==::waitpid(pid, &status, options)) { - pid=0; - } - if (errno == ECHILD) { - pid=0; + + ret = waitpid (pid, &status, options); + + if (ret == pid) { + if (WEXITSTATUS(status) || WIFSIGNALED(status)) { + pid=0; + } + } else { + if (ret != 0) { + if (errno == ECHILD) { + /* no currently running children, reset pid */ + pid=0; + } + } /* else the process is still running */ } return status; } @@ -611,7 +636,7 @@ SystemExec::output_interposer() ssize_t r; unsigned long l = 1; - ioctl(rfd, FIONBIO, &l); // set non-blocking I/O + ioctl(rfd, FIONBIO, &l); // set non-blocking I/O for (;fcntl(rfd, F_GETFL)!=-1;) { r = read(rfd, buf, sizeof(buf)); @@ -643,7 +668,8 @@ int SystemExec::write_to_stdin(std::string d, size_t len) { const char *data; - size_t r,c; + ssize_t r; + size_t c; ::pthread_mutex_lock(&write_lock); data=d.c_str(); @@ -658,7 +684,7 @@ SystemExec::write_to_stdin(std::string d, size_t len) sleep(1); continue; } - if (r != (len-c)) { + if ((size_t) r != (len-c)) { ::pthread_mutex_unlock(&write_lock); return c; } diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index b68f57076e..3e7ef8f0a9 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -148,44 +148,41 @@ VideoTimeLine::set_session (ARDOUR::Session *s) return; } - if (node) { - ARDOUR_UI::instance()->start_video_server((Gtk::Window*)0, false); + ARDOUR_UI::instance()->start_video_server((Gtk::Window*)0, false); - set_id(*node); + set_id(*node); - const XMLProperty* proph = node->property (X_("Height")); - if (proph) { - editor->set_video_timeline_height(atoi(proph->value().c_str())); - } + const XMLProperty* proph = node->property (X_("Height")); + if (proph) { + editor->set_video_timeline_height(atoi(proph->value().c_str())); + } #if 0 /* TODO THINK: set FPS first time only ?! */ - const XMLProperty* propasfps = node->property (X_("AutoFPS")); - if (propasfps) { - auto_set_session_fps = atoi(propasfps->value().c_str())?true:false; - } + const XMLProperty* propasfps = node->property (X_("AutoFPS")); + if (propasfps) { + auto_set_session_fps = atoi(propasfps->value().c_str())?true:false; + } #endif - const XMLProperty* propoffset = node->property (X_("VideoOffset")); - if (propoffset) { - video_offset = atoll(propoffset->value().c_str()); - video_offset_p = video_offset; - } - - const XMLProperty* proplock = node->property (X_("VideoOffsetLock")); - if (proplock) { - video_offset_lock = atoi(proplock->value().c_str())?true:false; - } + const XMLProperty* propoffset = node->property (X_("VideoOffset")); + if (propoffset) { + video_offset = atoll(propoffset->value().c_str()); + video_offset_p = video_offset; + } - const XMLProperty* localfile = node->property (X_("LocalFile")); - if (localfile) { - local_file = atoi(localfile->value().c_str())?true:false; - } + const XMLProperty* proplock = node->property (X_("VideoOffsetLock")); + if (proplock) { + video_offset_lock = atoi(proplock->value().c_str())?true:false; + } - const XMLProperty* propf = node->property (X_("Filename")); - video_file_info(propf->value(), local_file); + const XMLProperty* localfile = node->property (X_("LocalFile")); + if (localfile) { + local_file = atoi(localfile->value().c_str())?true:false; } - node = _session->extra_xml (X_("Videomonitor")); - if (node) { + const XMLProperty* propf = node->property (X_("Filename")); + video_file_info(propf->value(), local_file); + + if ((node = _session->extra_xml (X_("Videomonitor")))) { const XMLProperty* prop = node->property (X_("active")); if (prop && prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) { open_video_monitor(); @@ -504,7 +501,7 @@ VideoTimeLine::video_file_info (std::string filename, bool local) } _session->config.set_video_pullup(0); /* TODO only set if set_timecode_format() was successful ?!*/ } - if (video_file_fps != _session->timecode_frames_per_second()) { + if (floor(video_file_fps*100) != floor(_session->timecode_frames_per_second()*100)) { warning << _("Video file's framerate is not equal to Ardour session timecode's framerate: ") << video_file_fps << _(" vs ") << _session->timecode_frames_per_second() << endmsg; } diff --git a/gtk2_ardour/window_manager.cc b/gtk2_ardour/window_manager.cc index 986e6ade3a..2a195ac90f 100644 --- a/gtk2_ardour/window_manager.cc +++ b/gtk2_ardour/window_manager.cc @@ -130,12 +130,19 @@ Manager::set_session (ARDOUR::Session* s) void Manager::set_transient_for (Gtk::Window* parent) { + /* OS X has a richer concept of window layering than X does (or + * certainly, than any accepted conventions on X), and so the use of + * Manager::set_transient_for() is not necessary on that platform. + * + * On OS X this is mostly taken care of by using the window type rather + * than explicit 1:1 transient-for relationships. + */ + #ifndef __APPLE__ if (parent) { for (Windows::const_iterator i = _windows.begin(); i != _windows.end(); ++i) { Gtk::Window* win = (*i)->get(); if (win) { - std::cerr << "marked " << win->get_title() << " as transient of " << parent->get_title() << std::endl; win->set_transient_for (*parent); } } diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index db1b316368..119f01fc6b 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -110,6 +110,9 @@ Butler::start_thread() return -1; } + fcntl(request_pipe[0], F_SETFD, fcntl(request_pipe[0], F_GETFD) | FD_CLOEXEC); + fcntl(request_pipe[1], F_SETFD, fcntl(request_pipe[1], F_GETFD) | FD_CLOEXEC); + //pthread_detach (thread); return 0; diff --git a/libs/ardour/rdff.c b/libs/ardour/rdff.c index ca8e1abf1f..9dbb6ddae1 100644 --- a/libs/ardour/rdff.c +++ b/libs/ardour/rdff.c @@ -74,6 +74,8 @@ rdff_open(const char* path, bool write) } } + fcntl(fileno(fd), F_SETFD, fcntl(fileno(fd), F_GETFD) | FD_CLOEXEC); + RDFF ret = (RDFF)malloc(sizeof(struct _RDFF)); ret->fd = fd; ret->size = size; diff --git a/libs/midi++2/ipmidi_port.cc b/libs/midi++2/ipmidi_port.cc index c90a3dbe6f..543c63e343 100644 --- a/libs/midi++2/ipmidi_port.cc +++ b/libs/midi++2/ipmidi_port.cc @@ -160,6 +160,8 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname) return false; } + fcntl(sockin, F_SETFD, fcntl(sockin, F_GETFD) | FD_CLOEXEC); + struct sockaddr_in addrin; ::memset(&addrin, 0, sizeof(addrin)); addrin.sin_family = AF_INET; @@ -206,6 +208,8 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname) ::perror("socket(out)"); return false; } + + fcntl(sockout, F_SETFD, fcntl(sockout, F_GETFD) | FD_CLOEXEC); // Will Hall, Oct 2007 if (!ifname.empty()) { diff --git a/libs/pbd/controllable_descriptor.cc b/libs/pbd/controllable_descriptor.cc index 392b917ec8..9c930e4dbd 100644 --- a/libs/pbd/controllable_descriptor.cc +++ b/libs/pbd/controllable_descriptor.cc @@ -104,10 +104,11 @@ ControllableDescriptor::set (const std::string& str) } } else if (path[1] == "send") { - if (path.size() == 3 && rest.size() == 2) { + if (path.size() == 3 && rest.size() == 3) { if (path[2] == "gain") { _subtype = SendGain; _target.push_back (atoi (rest[1])); + _target.push_back (atoi (rest[2])); } else { return -1; } diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc index 2ffede5163..aa9d2edcd2 100644 --- a/libs/pbd/crossthread.cc +++ b/libs/pbd/crossthread.cc @@ -52,6 +52,8 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking) return; } } + fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC); + fcntl(fds[1], F_SETFD, fcntl(fds[1], F_GETFD) | FD_CLOEXEC); } CrossThreadChannel::~CrossThreadChannel () diff --git a/libs/pbd/file_manager.cc b/libs/pbd/file_manager.cc index a71ffca190..fb3227a922 100644 --- a/libs/pbd/file_manager.cc +++ b/libs/pbd/file_manager.cc @@ -289,6 +289,9 @@ StdioFileDescriptor::open () /* we must have a lock on the FileManager's mutex */ _file = fopen (_path.c_str(), _mode.c_str()); + if (_file) { + fcntl(fileno(_file), F_SETFD, fcntl(fileno(_file), F_GETFD) | FD_CLOEXEC); + } return (_file == 0); } diff --git a/libs/pbd/sndfile_manager.cc b/libs/pbd/sndfile_manager.cc index d1dcd05256..c3fbd7be5b 100644 --- a/libs/pbd/sndfile_manager.cc +++ b/libs/pbd/sndfile_manager.cc @@ -90,7 +90,16 @@ SndFileDescriptor::open () { /* we must have a lock on the FileManager's mutex */ - _sndfile = sf_open (_path.c_str(), _writeable ? SFM_RDWR : SFM_READ, _info); + int fd = ::open(_path.c_str(), O_LARGEFILE | (_writeable ? (O_RDWR|O_CREAT) : O_RDONLY)); + if (fd == -1) return false; + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + + _sndfile = sf_open_fd (fd, _writeable ? SFM_RDWR : SFM_READ, _info, 1); + + if (sf_open_fd == 0) { + ::close(fd); + } + return (_sndfile == 0); } diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 357b82d4d2..d02626f4af 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -34,6 +34,7 @@ #include <pbd/file_utils.h> #include <pbd/failed_constructor.h> +#include "ardour/amp.h" #include "ardour/session.h" #include "ardour/route.h" #include "ardour/audio_track.h" @@ -42,6 +43,7 @@ #include "ardour/filesystem_paths.h" #include "ardour/panner.h" #include "ardour/plugin.h" +#include "ardour/send.h" #include "osc.h" #include "osc_controllable.h" @@ -164,6 +166,13 @@ OSC::start () _port++; continue; } + + if (!_osc_server) { + return 1; + } + + int fd = lo_server_get_socket_fd (_osc_server); + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); #ifdef ARDOUR_OSC_UNIX_SERVER @@ -172,7 +181,7 @@ OSC::start () // attempt to create unix socket server too snprintf(tmpstr, sizeof(tmpstr), "/tmp/sooperlooper_XXXXXX"); - int fd = mkstemp(tmpstr); + fd = mkstemp(tmpstr); if (fd >= 0 ) { unlink (tmpstr); @@ -182,6 +191,8 @@ OSC::start () if (_osc_unix_server) { _osc_unix_socket_path = tmpstr; + fd = lo_server_get_socket_fd (_osc_unix_server) + fcntl(fdx, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); } } #endif @@ -221,19 +232,23 @@ OSC::thread_init () pthread_set_name (X_("OSC")); if (_osc_unix_server) { + const int fd = lo_server_get_socket_fd (_osc_unix_server); Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_unix_server), IO_IN|IO_HUP|IO_ERR); src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_unix_server)); src->attach (_main_loop->get_context()); local_server = src->gobj(); g_source_ref (local_server); + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); } if (_osc_server) { - Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_server), IO_IN|IO_HUP|IO_ERR); + const int fd = lo_server_get_socket_fd (_osc_server); + Glib::RefPtr<IOSource> src = IOSource::create (fd, IO_IN|IO_HUP|IO_ERR); src->connect (sigc::bind (sigc::mem_fun (*this, &OSC::osc_input_handler), _osc_server)); src->attach (_main_loop->get_context()); remote_server = src->gobj(); g_source_ref (remote_server); + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); } PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("OSC"), 2048); @@ -356,8 +371,8 @@ OSC::register_callbacks() REGISTER_CALLBACK (serv, "/ardour/routes/pan_stereo_width", "if", route_set_pan_stereo_width); REGISTER_CALLBACK (serv, "/ardour/routes/plugin/parameter", "iiif", route_plugin_parameter); REGISTER_CALLBACK (serv, "/ardour/routes/plugin/parameter/print", "iii", route_plugin_parameter_print); - - + REGISTER_CALLBACK (serv, "/ardour/routes/send/gainabs", "iif", route_set_send_gain_abs); + REGISTER_CALLBACK (serv, "/ardour/routes/send/gaindB", "iif", route_set_send_gain_dB); /* still not-really-standardized query interface */ //REGISTER_CALLBACK (serv, "/ardour/*/#current_value", "", current_value); @@ -892,6 +907,70 @@ OSC::route_set_pan_stereo_width (int rid, float pos) } int +OSC::route_set_send_gain_abs (int rid, int sid, float val) +{ + if (!session) { + return -1; + } + + boost::shared_ptr<Route> r = session->route_by_remote_id (rid); + + if (!r) { + return -1; + } + + /* revert to zero-based counting */ + + if (sid > 0) { + --sid; + } + + boost::shared_ptr<Processor> p = r->nth_send (sid); + + if (p) { + boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p); + boost::shared_ptr<Amp> a = s->amp(); + + if (a) { + a->set_gain (val, this); + } + } + return 0; +} + +int +OSC::route_set_send_gain_dB (int rid, int sid, float val) +{ + if (!session) { + return -1; + } + + boost::shared_ptr<Route> r = session->route_by_remote_id (rid); + + if (!r) { + return -1; + } + + /* revert to zero-based counting */ + + if (sid > 0) { + --sid; + } + + boost::shared_ptr<Processor> p = r->nth_send (sid); + + if (p) { + boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p); + boost::shared_ptr<Amp> a = s->amp(); + + if (a) { + a->set_gain (dB_to_coefficient (val), this); + } + } + return 0; +} + +int OSC::route_plugin_parameter (int rid, int piid, int par, float val) { if (!session) { diff --git a/libs/surfaces/osc/osc.h b/libs/surfaces/osc/osc.h index c09792ec64..5c3422799b 100644 --- a/libs/surfaces/osc/osc.h +++ b/libs/surfaces/osc/osc.h @@ -214,6 +214,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest> PATH_CALLBACK2(route_set_gain_dB,i,f); PATH_CALLBACK2(route_set_pan_stereo_position,i,f); PATH_CALLBACK2(route_set_pan_stereo_width,i,f); + PATH_CALLBACK3(route_set_send_gain_abs,i,i,f); + PATH_CALLBACK3(route_set_send_gain_dB,i,i,f); PATH_CALLBACK4(route_plugin_parameter,i,i,i,f); PATH_CALLBACK3(route_plugin_parameter_print,i,i,i); @@ -224,6 +226,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest> int route_set_gain_dB (int rid, float dB); int route_set_pan_stereo_position (int rid, float left_right_fraction); int route_set_pan_stereo_width (int rid, float percent); + int route_set_send_gain_abs (int rid, int sid, float val); + int route_set_send_gain_dB (int rid, int sid, float val); int route_plugin_parameter (int rid, int piid,int par, float val); int route_plugin_parameter_print (int rid, int piid,int par); diff --git a/tools/linux_packaging/noderun b/tools/linux_packaging/noderun index c48fdedbe7..b092abd5ca 100644 --- a/tools/linux_packaging/noderun +++ b/tools/linux_packaging/noderun @@ -11,7 +11,7 @@ fi cd $BASE || exit 1 git pull || exit 1 -./waf configure $* --strict --noconfirm --also-libdir=$HOME/a3/inst/lib --also-include=$HOME/gtk/inst/include || exit 1 +./waf configure $* --strict --backtrace --noconfirm --also-libdir=$HOME/a3/inst/lib --also-include=$HOME/gtk/inst/include || exit 1 ./waf || exit 1 cd tools/linux_packaging || exit 1 ./build --public --strip some || exit 1 @@ -107,12 +107,14 @@ def set_compiler_flags (conf,opt): platform = u[0].lower() version = u[2] + # waf adds -O0 -g itself. thanks waf! is_clang = conf.env['CXX'][0].endswith('clang++') if opt.gprofile: debug_flags = [ '-pg' ] - else: + + if opt.backtrace: if platform != 'darwin' and not is_clang: - debug_flags = [ '-rdynamic' ] # waf adds -O0 -g itself. thanks waf! + debug_flags = [ '-rdynamic' ] # Autodetect if opt.dist_target == 'auto': @@ -380,6 +382,8 @@ def options(opt): help='The user-visible name of the program being built') opt.add_option('--arch', type='string', action='store', dest='arch', help='Architecture-specific compiler flags') + opt.add_option('--backtrace', action='store_true', default=False, dest='backtrace', + help='Compile with -rdynamic -- allow obtaining backtraces from within Ardour') opt.add_option('--no-carbon', action='store_true', default=False, dest='nocarbon', help='Compile without support for AU Plugins with only CARBON UI (needed for 64bit)') opt.add_option('--boost-sp-debug', action='store_true', default=False, dest='boost_sp_debug', @@ -671,6 +675,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Build documentation', conf.env['DOCS']) write_config_text('Debuggable build', conf.env['DEBUG']) + write_config_text('Export all symbols (backtrace)', opts.backtrace) write_config_text('Install prefix', conf.env['PREFIX']) write_config_text('Strict compiler flags', conf.env['STRICT']) write_config_text('Internal Shared Libraries', conf.is_defined('INTERNAL_SHARED_LIBS')) |