X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fplugin.cc;h=3b471014eb503199216d69200fb4f7d405c224c7;hb=5a8bc070cd5ca79a53487f536c6df966ffc8df39;hp=bedc32a0b359f53e951ef1f344458fea05b05b71;hpb=1a03f9440d11d74d291737d5b98e5624023860ac;p=ardour.git diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index bedc32a0b3..3b471014eb 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -95,15 +95,17 @@ Plugin::get_nth_control (uint32_t n) Plugin::ParameterDescriptor desc; get_parameter_descriptor (n, desc); - - controls[n] = new PortControllable (*this, n, desc.lower, desc.upper, desc.toggled, desc.logarithmic); + + controls[n] = new PortControllable (describe_parameter (n), *this, n, + desc.lower, desc.upper, desc.toggled, desc.logarithmic); } return controls[n]; } -Plugin::PortControllable::PortControllable (Plugin& p, uint32_t port_id, float low, float up, bool t, bool loga) - : plugin (p), absolute_port (port_id) +Plugin::PortControllable::PortControllable (string name, Plugin& p, uint32_t port_id, + float low, float up, bool t, bool loga) + : Controllable (name), plugin (p), absolute_port (port_id) { toggled = t; logarithmic = loga; @@ -224,13 +226,13 @@ Plugin::save_preset (string name, string domain) free(lrdf_add_preset(source.c_str(), name.c_str(), unique_id(), &defaults)); string path = string_compose("%1/.%2", envvar, domain); - if (mkdir(path.c_str(), 0775) && errno != EEXIST) { + if (g_mkdir_with_parents (path.c_str(), 0775)) { warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg; return false; } path += "/rdf"; - if (mkdir(path.c_str(), 0775) && errno != EEXIST) { + if (g_mkdir_with_parents (path.c_str(), 0775)) { warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg; return false; } @@ -261,7 +263,7 @@ ARDOUR::find_plugin(Session& session, string name, long unique_id, PluginType ty break; #endif -#ifdef HAVE_COREAUDIO +#ifdef HAVE_AUDIOUNITS case ARDOUR::AudioUnit: plugs = AUPluginInfo::discover (); unique_id = 0; // Neither do AU. @@ -282,3 +284,4 @@ ARDOUR::find_plugin(Session& session, string name, long unique_id, PluginType ty return PluginPtr ((Plugin*) 0); } +