diff --git a/gtk2_ardour/lv2_external_ui.h b/gtk2_ardour/lv2_external_ui.h index 19fa912f04..9f404e6d9a 100644 --- a/gtk2_ardour/lv2_external_ui.h +++ b/gtk2_ardour/lv2_external_ui.h @@ -37,6 +37,8 @@ /** UI extension suitable for out-of-process UIs */ #define LV2_EXTERNAL_UI_URI "http://lv2plug.in/ns/extensions/ui#external" +#define LV2_EXTERNAL_UI_KX__Host "http://kxstudio.sf.net/ns/lv2ext/external-ui#Host" + #ifdef __cplusplus extern "C" { #endif diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index f9b15714f6..c273c1f4dd 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -113,6 +113,7 @@ LV2PluginUI::update_timeout() void LV2PluginUI::on_external_ui_closed(void* controller) { + //printf("LV2PluginUI::on_external_ui_closed\n"); LV2PluginUI* me = (LV2PluginUI*)controller; me->_screen_update_connection.disconnect(); me->_external_ui_ptr = NULL; @@ -167,6 +168,19 @@ LV2PluginUI::output_update() //cout << "output_update" << endl; if (_external_ui_ptr) { LV2_EXTERNAL_UI_RUN(_external_ui_ptr); + if (_lv2->is_external_kx() && !_external_ui_ptr) { + // clean up external UI if it closes itself via + // on_external_ui_closed() during run() + //printf("LV2PluginUI::output_update -- UI was closed\n"); + //_screen_update_connection.disconnect(); + _message_update_connection.disconnect(); + if (_inst) { + suil_instance_free((SuilInstance*)_inst); + } + _inst = NULL; + _external_ui_ptr = NULL; + return; + } } /* FIXME only works with control output ports (which is all we support now anyway) */ @@ -218,12 +232,16 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title) _external_ui_feature.URI = LV2_EXTERNAL_UI_URI; _external_ui_feature.data = &_external_ui_host; + _external_kxui_feature.URI = LV2_EXTERNAL_UI_KX__Host; + _external_kxui_feature.data = &_external_ui_host; + ++features_count; features = (LV2_Feature**)malloc( - sizeof(LV2_Feature*) * (features_count + 1)); - for (size_t i = 0; i < features_count - 1; ++i) { + sizeof(LV2_Feature*) * (features_count + 2)); + for (size_t i = 0; i < features_count - 2; ++i) { features[i] = features_src[i]; } + features[features_count - 2] = &_external_kxui_feature; features[features_count - 1] = &_external_ui_feature; features[features_count] = NULL; } else { @@ -260,6 +278,10 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title) ? NS_UI "external" : NS_UI "GtkUI"; + if (_lv2->has_message_output()) { + _lv2->enable_ui_emmission(); + } + const LilvUI* ui = (const LilvUI*)_lv2->c_ui(); _inst = suil_instance_new( ui_host, @@ -322,8 +344,7 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title) } if (_lv2->has_message_output()) { - _lv2->enable_ui_emmission(); - ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect( + _message_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect( sigc::mem_fun(*this, &LV2PluginUI::update_timeout)); } } @@ -350,17 +371,14 @@ LV2PluginUI::~LV2PluginUI () delete[] _values; } - /* Close and delete GUI. */ - lv2ui_free(); - + _message_update_connection.disconnect(); _screen_update_connection.disconnect(); - if (_lv2->is_external_ui()) { - /* External UI is no longer valid. - on_window_hide() will not try to use it if is NULL. - */ - _external_ui_ptr = NULL; + if (_external_ui_ptr && _lv2->is_external_kx()) { + LV2_EXTERNAL_UI_HIDE(_external_ui_ptr); } + lv2ui_free(); + _external_ui_ptr = NULL; } int @@ -423,7 +441,15 @@ LV2PluginUI::on_window_show(const std::string& title) if (_lv2->is_external_ui()) { if (_external_ui_ptr) { + _screen_update_connection.disconnect(); + _message_update_connection.disconnect(); LV2_EXTERNAL_UI_SHOW(_external_ui_ptr); + _screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect + (sigc::mem_fun(*this, &LV2PluginUI::output_update)); + if (_lv2->has_message_output()) { + _message_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect( + sigc::mem_fun(*this, &LV2PluginUI::update_timeout)); + } return false; } lv2ui_instantiate(title); @@ -431,10 +457,15 @@ LV2PluginUI::on_window_show(const std::string& title) return false; } - LV2_EXTERNAL_UI_SHOW(_external_ui_ptr); _screen_update_connection.disconnect(); + _message_update_connection.disconnect(); + LV2_EXTERNAL_UI_SHOW(_external_ui_ptr); _screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect - (sigc::mem_fun(*this, &LV2PluginUI::output_update)); + (sigc::mem_fun(*this, &LV2PluginUI::output_update)); + if (_lv2->has_message_output()) { + _message_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect( + sigc::mem_fun(*this, &LV2PluginUI::update_timeout)); + } return false; } else { lv2ui_instantiate("gtk2gui"); @@ -446,13 +477,17 @@ LV2PluginUI::on_window_show(const std::string& title) void LV2PluginUI::on_window_hide() { - //cout << "on_window_hide" << endl; flush(cout); + //printf("LV2PluginUI::on_window_hide\n"); + _message_update_connection.disconnect(); - if (_external_ui_ptr) { + if (_lv2->is_external_ui()) { + if (!_external_ui_ptr) { return; } LV2_EXTERNAL_UI_HIDE(_external_ui_ptr); - //slv2_ui_instance_get_descriptor(_inst)->cleanup(_inst); - //_external_ui_ptr = NULL; - //_screen_update_connection.disconnect(); + if (!_lv2->is_external_kx()) { return ; } + _screen_update_connection.disconnect(); + _external_ui_ptr = NULL; + suil_instance_free((SuilInstance*)_inst); + _inst = NULL; } else { lv2ui_free(); } diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h index edb90cb154..a39386a7e0 100644 --- a/gtk2_ardour/lv2_plugin_ui.h +++ b/gtk2_ardour/lv2_plugin_ui.h @@ -71,6 +71,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox boost::shared_ptr _lv2; std::vector _output_ports; sigc::connection _screen_update_connection; + sigc::connection _message_update_connection; Gtk::Widget* _gui_widget; /** a box containing the focus, bypass, delete, save / add preset buttons etc. */ Gtk::HBox _ardour_buttons_box; @@ -78,6 +79,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox std::vector _controllables; struct lv2_external_ui_host _external_ui_host; LV2_Feature _external_ui_feature; + LV2_Feature _external_kxui_feature; struct lv2_external_ui* _external_ui_ptr; LV2_Feature _parent_feature; Gtk::Window* _win_ptr; diff --git a/gtk2_ardour/po/cs.po b/gtk2_ardour/po/cs.po index 452ba5dfb1..cec031544b 100644 --- a/gtk2_ardour/po/cs.po +++ b/gtk2_ardour/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk-ardour 0.347.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-06-13 12:05+0200\n" "Last-Translator: Pavel Fric \n" "Language-Team: Czech \n" @@ -10488,7 +10488,7 @@ msgstr "Klepněte pro přidání nového umístění" msgid "the session folder" msgstr "složka se sezením" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Poslat " diff --git a/gtk2_ardour/po/de.po b/gtk2_ardour/po/de.po index ae2da4c3f4..74288bde3f 100644 --- a/gtk2_ardour/po/de.po +++ b/gtk2_ardour/po/de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gtk-ardour 0.347.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" -"PO-Revision-Date: 2013-07-28 15:37+0200\n" +"POT-Creation-Date: 2013-09-03 10:44+0200\n" +"PO-Revision-Date: 2013-09-03 11:41+0200\n" "Last-Translator: Edgar Aichinger \n" "Language-Team: German \n" "Language: de\n" @@ -1547,9 +1547,8 @@ msgstr "" "Einzelheiten." #: ardour_ui2.cc:147 -#, fuzzy msgid "Reset Level Meter" -msgstr "Lautstärkekurve zurücksetzen" +msgstr "Lautstärkepegelanzeige zurücksetzen" #: ardour_ui2.cc:179 msgid "[ERROR]: " @@ -5836,7 +5835,7 @@ msgstr "Nur Aufnahme" #: engine_dialog.cc:171 engine_dialog.cc:448 msgid "coremidi" -msgstr "" +msgstr "coremidi" #: engine_dialog.cc:173 engine_dialog.cc:581 msgid "seq" @@ -6311,22 +6310,20 @@ msgid "Range" msgstr "Bereiche" #: sfdb_freesound_mootcher.cc:189 sfdb_freesound_mootcher.cc:324 -#, fuzzy msgid "curl error %1 (%2)" -msgstr "Programmierfehler: %1 (%2)" +msgstr "curl Fehler %1 (%2)" #: sfdb_freesound_mootcher.cc:266 msgid "getSoundResourceFile: There is no valid root in the xml file" -msgstr "" +msgstr "getSoundResourceFile: Keine gültige Wurzel in der XML-Datei" #: sfdb_freesound_mootcher.cc:271 msgid "getSoundResourceFile: root = %1, != response" -msgstr "" +msgstr "getSoundResourceFile: Wurzel = %1, != Antwort" #: sfdb_freesound_mootcher.cc:410 -#, fuzzy msgid "%1" -msgstr "%" +msgstr "%1" #: gain_meter.cc:106 gain_meter.cc:357 gain_meter.cc:462 gain_meter.cc:856 msgid "-inf" @@ -7649,26 +7646,24 @@ msgid "Strips" msgstr "Spur" #: meter_strip.cc:764 -#, fuzzy msgid "Variable height" -msgstr "Höhe der Zeitleiste" +msgstr "Variable Höhe" #: meter_strip.cc:765 -#, fuzzy msgid "Short" -msgstr "Kurz" +msgstr "Short" #: meter_strip.cc:766 msgid "Tall" -msgstr "" +msgstr "Tall" #: meter_strip.cc:767 msgid "Grande" -msgstr "" +msgstr "Grande" #: meter_strip.cc:768 msgid "Venti" -msgstr "" +msgstr "Venti" #: meter_patterns.cc:81 msgid "Peak" @@ -8539,14 +8534,15 @@ msgid "Port removal not allowed" msgstr "Entfernen des Ports nicht erlaubt" #: port_matrix.cc:749 -#, fuzzy msgid "" "This port cannot be removed.\n" "Either the first plugin in the track or buss cannot accept\n" "the new number of inputs or the last plugin has more outputs." msgstr "" -"Der Port kann nicht entfernt werden, da das erste Plugin der Spur die neue " -"Portanzahl nicht unterstützt." +"Dieser Port kann nicht entfernt werden.\n" +"Entweder kann das erste Plugin auf der Spur oder dem Bus \n" +"die neue Anzahl an Eingängen nicht verarbeiten, oder das \n" +"letzte Plugin hat mehr Ausgänge." #: port_matrix.cc:966 #, c-format @@ -9268,7 +9264,7 @@ msgstr "Aktiviere Pegelanzeigen im Editor" #: rc_option_editor.cc:1321 msgid "Display master-meter in the toolbar" -msgstr "" +msgstr "Master-Pegelanzeige in der Werkzeugleiste anzeigen" #: rc_option_editor.cc:1328 msgid "Regions in active edit groups are edited together" @@ -10496,7 +10492,7 @@ msgstr "Hier klicken, um einen Pfad hinzuzufügen" msgid "the session folder" msgstr "Projektordner" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Send " @@ -12552,7 +12548,6 @@ msgid "File Information" msgstr "Dateiinformationen" #: transcode_video_dialog.cc:113 -#, fuzzy msgid "" "No ffprobe or ffmpeg executables could be found on this system. Video Import " "is not possible until you install those tools. See the Log window for more " @@ -12777,7 +12772,6 @@ msgid "Include Session Metadata" msgstr "Projekt-Metadaten verwenden" #: export_video_dialog.cc:107 -#, fuzzy msgid "" "No ffprobe or ffmpeg executables could be found on this system. Video Export " "is not possible until you install those tools. See the Log window for more " diff --git a/gtk2_ardour/po/el.po b/gtk2_ardour/po/el.po index 5320d21b82..47a42cccc7 100644 --- a/gtk2_ardour/po/el.po +++ b/gtk2_ardour/po/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk-ardour 0.347.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2007-04-11 02:27+0200\n" "Last-Translator: Klearchos Gourgourinis \n" "Language-Team: Hellenic\n" @@ -11084,7 +11084,7 @@ msgstr "Εκκαθάριση όλων των θέσεων" msgid "the session folder" msgstr "Αντιγραφή αρχείου στο φάκελο της συνεδρίας" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Δευτερόλεπτα" diff --git a/gtk2_ardour/po/en_GB.po b/gtk2_ardour/po/en_GB.po index eec6f28ea8..d7c9874ecc 100644 --- a/gtk2_ardour/po/en_GB.po +++ b/gtk2_ardour/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Ardour 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2011-12-08 15:38+0100\n" "Last-Translator: Colin Fletcher \n" "Language-Team: UK English \n" @@ -9941,7 +9941,7 @@ msgstr "" msgid "the session folder" msgstr "" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "" diff --git a/gtk2_ardour/po/es.po b/gtk2_ardour/po/es.po index 7e61355dc2..aa9a7b6ec8 100644 --- a/gtk2_ardour/po/es.po +++ b/gtk2_ardour/po/es.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk2_ardour\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: \n" "Last-Translator: Pablo Fernández \n" "Language-Team: Grupo de Traducción al Español \n" @@ -10451,7 +10451,7 @@ msgstr "Clicar para añadir nueva localización" msgid "the session folder" msgstr "el archivo de sesión" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Enviar " diff --git a/gtk2_ardour/po/fr.po b/gtk2_ardour/po/fr.po index f9e857303d..60560cfa0b 100644 --- a/gtk2_ardour/po/fr.po +++ b/gtk2_ardour/po/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Ardour 2.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-05-20 01:04+0200\n" "Last-Translator: \n" "Language-Team: American English \n" @@ -10683,7 +10683,7 @@ msgstr "Cliquez pour ajouter un nouveau dossier" msgid "the session folder" msgstr "dossier de la session" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Départ " diff --git a/gtk2_ardour/po/it.po b/gtk2_ardour/po/it.po index 0c55d99290..673dfbe159 100644 --- a/gtk2_ardour/po/it.po +++ b/gtk2_ardour/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ardour 0.354.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2011-11-05 12:43+0100\n" "Last-Translator: \n" "Language-Team: American English \n" @@ -10715,7 +10715,7 @@ msgstr "Pulisci tutte le posizioni" msgid "the session folder" msgstr "la cartella di sessione" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Secondi" diff --git a/gtk2_ardour/po/nn.po b/gtk2_ardour/po/nn.po index d83e138a19..f288526c94 100644 --- a/gtk2_ardour/po/nn.po +++ b/gtk2_ardour/po/nn.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk2_ardour 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-01-05 14:48+0100\n" "Last-Translator: Eivind Ødegård \n" "Language-Team: \n" @@ -10467,7 +10467,7 @@ msgstr "Klikk for å leggja til ein ny stad" msgid "the session folder" msgstr "øktmappa" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Send" diff --git a/gtk2_ardour/po/pl.po b/gtk2_ardour/po/pl.po index 8947ea0365..1a33b99249 100644 --- a/gtk2_ardour/po/pl.po +++ b/gtk2_ardour/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk2_ardour\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2008-04-10 10:47+0100\n" "Last-Translator: Piotr Zaryk \n" "Language-Team: Polish \n" @@ -10992,7 +10992,7 @@ msgstr "Wyczyść wszystkie położenia" msgid "the session folder" msgstr "Wybieranie pliku sesji" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Wysyłanie MTC" diff --git a/gtk2_ardour/po/pt.po b/gtk2_ardour/po/pt.po index 6b8b85eae2..01dfaa9ffc 100644 --- a/gtk2_ardour/po/pt.po +++ b/gtk2_ardour/po/pt.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: ardour 0.688.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2005-08-15 21:50-0000\n" "Last-Translator: Chris Ross, Alexander Franca & Leandro Marco\n" "Language-Team: Portuguese\n" @@ -11153,7 +11153,7 @@ msgstr "Apagar todas as localizações" msgid "the session folder" msgstr "Loop região selecionada" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Segundos" diff --git a/gtk2_ardour/po/pt_PT.po b/gtk2_ardour/po/pt_PT.po index b5170493fc..380b1a71ac 100644 --- a/gtk2_ardour/po/pt_PT.po +++ b/gtk2_ardour/po/pt_PT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gtk2_ardour rev.1702\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2007-04-15 19:00+0100\n" "Last-Translator: Rui Nuno Capela \n" "Language-Team: Portuguese\n" @@ -11099,7 +11099,7 @@ msgstr "Apagar todas as localizações" msgid "the session folder" msgstr "Copiar ficheiro para o directório de sessão" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Envios" diff --git a/gtk2_ardour/po/ru.po b/gtk2_ardour/po/ru.po index f50cdf44d1..1891a32bf1 100644 --- a/gtk2_ardour/po/ru.po +++ b/gtk2_ardour/po/ru.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Ardour 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-07-14 18:04+0300\n" "Last-Translator: Александр Прокудин \n" "Language-Team: русский <>\n" @@ -10323,7 +10323,7 @@ msgstr "Щёлкните для добавления нового располо msgid "the session folder" msgstr "в папке сеанса" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "Посыл" diff --git a/gtk2_ardour/po/sv.po b/gtk2_ardour/po/sv.po index b2e70618bf..03f7db506f 100644 --- a/gtk2_ardour/po/sv.po +++ b/gtk2_ardour/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ardour-gtk 1.0.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2006-06-26 23:57+GMT+1\n" "Last-Translator: Petter Sundlöf \n" "Language-Team: Svenska \n" @@ -10757,7 +10757,7 @@ msgstr " Klicka här för att lägga till ett format" msgid "the session folder" msgstr "Skapa sessionsmappen i:" -#: send_ui.cc:122 +#: send_ui.cc:126 #, fuzzy msgid "Send " msgstr "Skicka MTC" diff --git a/gtk2_ardour/po/zh.po b/gtk2_ardour/po/zh.po index 292a11b18e..f03eaf1506 100644 --- a/gtk2_ardour/po/zh.po +++ b/gtk2_ardour/po/zh.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Ardour 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-01-03 08:29-0500\n" "Last-Translator: Rui-huai Zhang \n" "Language-Team: zrhzrh \n" @@ -10396,7 +10396,7 @@ msgstr "" msgid "the session folder" msgstr "" -#: send_ui.cc:122 +#: send_ui.cc:126 msgid "Send " msgstr "发送" diff --git a/gtk2_ardour/volume_controller.cc b/gtk2_ardour/volume_controller.cc index 27fd705978..6db3bc7d7a 100644 --- a/gtk2_ardour/volume_controller.cc +++ b/gtk2_ardour/volume_controller.cc @@ -142,7 +142,6 @@ VolumeController::adjust (double control_delta) double v; if (!_linear) { - /* we map back into the linear/fractional slider position, * because this kind of control goes all the way down * to -inf dB, and we want this occur in a reasonable way in @@ -150,7 +149,7 @@ VolumeController::adjust (double control_delta) * gain coefficient domain (or dB domain), the lower end of the * control range (getting close to -inf dB) takes forever. */ - +#if 0 /* convert to linear/fractional slider position domain */ v = gain_to_slider_position_with_max (_controllable->get_value (), _controllable->upper()); /* increment in this domain */ @@ -171,6 +170,57 @@ VolumeController::adjust (double control_delta) } /* and return it */ return dB_to_coefficient (v); +#else + /* ^^ Above algorithm is not symmetric. Scroll up to steps, scoll down two steps, -> different gain. + * + * see ./libs/gtkmm2ext/gtkmm2ext/motionfeedback.h and gtk2_ardour/monitor_section.cc: + * min-delta (corr) = MIN(0.01 * page inc, 1 * size_inc) // (gain_control uses size_inc=0.01, page_inc=0.1) + * range corr: 0..2 -> -inf..+6dB + * step sizes [0.01, 0.10, 0.20] * page_inc, [1,2,10,100] * step_inc. [1,2,10,100] * page_inc + * + * 0.001, 0.01, 0.02, 0.1, .2, 1, 10 + * -> 1k steps between -inf..0dB + * -> 1k steps between 0..+dB + * + * IOW: + * the range is from *0 (-inf dB) to *2.0 ( +6dB) + * the knob is configured to to go in steps of 0.001 - that's 2000 steps between 0 and 2. + * or 1000 steps between 0 and 1. + * + * we cannot round to .01dB steps because + * There are only 600 possible values between +0db and +6dB when going in steps of .01dB + * 1000/600 = 1.66666... + * + ****** + * idea: make the 'controllable use a fixed range of dB. + * do a 1:1 mapping between values. :et's stick with the range of 0..2 in 0.001 steps + * + * "-80" becomes 0 and "+6" becomes 2000. (NB +6dB is actually 1995, but we clamp that to the top) + * + * This approach is better (more consistet) but not good. At least the dial does not annoy me as much + * anymore as it did before. + * + * const double stretchfactor = rint((_controllable->upper() - _controllable->lower()) / 0.001); // 2000; + * const double logfactor = stretchfactor / ((20.0 * log10( _controllable->upper())) + 80.0); // = 23.250244732 + */ + v = _controllable->get_value (); + /* assume everything below -60dB is silent (.001 ^= -60dB) + * but map range -80db..+6dB to a scale of 0..2000 + * 80db was motivated because 2000/((20.0 * log(1)) + 80.0) is an integer value. "0dB" is included on the scale. + * but this leaves a dead area at the bottom of the meter.. + */ + double arange = (v >= 0.001) ? ( ((20.0 * log10(v)) + 80.0) * 23.250244732 ) : ( 0 ); + /* add the delta */ + v = rint(arange) + rint(control_delta * 1000.0); // (min steps is 1.0/0.001 == 1000.0) + /* catch bottom -80..-60 db in one step */ + if (v < 466) v = (control_delta > 0) ? 0.001 : 0; + /* reverse operation (pow(10, .05 * ((v / 23.250244732) - 80.0))) + * can be simplified to :*/ + else v = pow(10, (v * 0.00215051499) - 4.0); + /* clamp value in coefficient domain */ + v = std::max (_controllable->lower(), std::min (_controllable->upper(), v)); + return v; +#endif } else { double mult; diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 5154cd4d3e..6b4b1a1c67 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -77,6 +77,7 @@ class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee const void* c_ui_type(); bool is_external_ui () const; + bool is_external_kx () const; bool ui_is_resizable () const; const char* port_symbol (uint32_t port) const; diff --git a/libs/ardour/ardour/visibility.h b/libs/ardour/ardour/visibility.h index 61b75064ac..09287b877d 100644 --- a/libs/ardour/ardour/visibility.h +++ b/libs/ardour/ardour/visibility.h @@ -20,7 +20,12 @@ #ifndef __libardour_visibility_h__ #define __libardour_visibility_h__ -#if defined _WIN32 || defined __CYGWIN__ +/* _WIN32 is defined by most compilers targetting Windows, but within the + * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) #define LIBARDOUR_HELPER_DLL_IMPORT __declspec(dllimport) #define LIBARDOUR_HELPER_DLL_EXPORT __declspec(dllexport) #define LIBARDOUR_HELPER_DLL_LOCAL diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 622a42edf2..c7853a8785 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -923,7 +923,7 @@ AudioDiskstream::internal_playback_seek (framecnt_t distance) boost::shared_ptr c = channels.reader(); for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->playback_buf->increment_read_ptr (llabs(distance)); + (*chan)->playback_buf->increment_read_ptr (std::llabs(distance)); } if (first_recordable_frame < max_framepos) { diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 0530dbfce9..2e697a95cc 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -315,7 +315,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram if (!lm.locked()) { boost::shared_ptr diskstream = audio_diskstream(); framecnt_t playback_distance = diskstream->calculate_playback_distance(nframes); - if (can_internal_playback_seek(llabs(playback_distance))) { + if (can_internal_playback_seek(std::llabs(playback_distance))) { /* TODO should declick */ internal_playback_seek(playback_distance); } diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 79a5125606..5e3e5ba9e2 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -1624,10 +1624,8 @@ AudioEngine::request_jack_monitors_input (const std::string& portname, bool yn) void AudioEngine::update_latencies () { - if (jack_recompute_total_latencies) { - GET_PRIVATE_JACK_POINTER (_jack); - jack_recompute_total_latencies (_priv_jack); - } + GET_PRIVATE_JACK_POINTER (_jack); + jack_recompute_total_latencies (_priv_jack); } void diff --git a/libs/ardour/iec1ppmdsp.cc b/libs/ardour/iec1ppmdsp.cc index bed825048f..79a572da1c 100644 --- a/libs/ardour/iec1ppmdsp.cc +++ b/libs/ardour/iec1ppmdsp.cc @@ -45,8 +45,8 @@ void Iec1ppmdsp::process (float *p, int n) { float z1, z2, m, t; - z1 = _z1; - z2 = _z2; + z1 = _z1 > 20 ? 20 : (_z1 < 0 ? 0 : _z1); + z2 = _z2 > 20 ? 20 : (_z2 < 0 ? 0 : _z2); m = _res ? 0: _m; _res = false; diff --git a/libs/ardour/iec2ppmdsp.cc b/libs/ardour/iec2ppmdsp.cc index 76862cccd2..caca744c52 100644 --- a/libs/ardour/iec2ppmdsp.cc +++ b/libs/ardour/iec2ppmdsp.cc @@ -45,8 +45,8 @@ void Iec2ppmdsp::process (float *p, int n) { float z1, z2, m, t; - z1 = _z1; - z2 = _z2; + z1 = _z1 > 20 ? 20 : (_z1 < 0 ? 0 : _z1); + z2 = _z2 > 20 ? 20 : (_z2 < 0 ? 0 : _z2); m = _res ? 0: _m; _res = false; diff --git a/libs/ardour/interpolation.cc b/libs/ardour/interpolation.cc index fccc805cb0..bccaa45553 100644 --- a/libs/ardour/interpolation.cc +++ b/libs/ardour/interpolation.cc @@ -135,17 +135,18 @@ CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input, inm1 = input[i]; } + i = floor(distance); + phase[channel] = distance - floor(distance); + } else { - - /* not sure that this is ever utilized - it implies that one of the input/output buffers is missing */ - + /* used to calculate play-distance with acceleration (silent roll) + * (use same algorithm as real playback for identical rounding/floor'ing) + */ for (framecnt_t outsample = 0; outsample < nframes; ++outsample) { distance += _speed + acceleration; } + i = floor(distance); } - i = floor(distance); - phase[channel] = distance - floor(distance); - return i; } diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc index 4cacd8ae5d..ecbf8976fd 100644 --- a/libs/ardour/jack_utils.cc +++ b/libs/ardour/jack_utils.cc @@ -442,6 +442,8 @@ ARDOUR::get_jack_coreaudio_device_names (device_map_t& devices) } delete [] coreDeviceIDs; } +#else + (void) devices; #endif } @@ -583,6 +585,8 @@ ARDOUR::set_path_env_for_jack_autostart (const vector& dirs) // push it back into the environment so that auto-started JACK can find it. // XXX why can't we just expect OS X users to have PATH set correctly? we can't ... setenv ("PATH", SearchPath(dirs).to_string().c_str(), 1); +#else + (void) dirs; #endif } diff --git a/libs/ardour/kmeterdsp.cc b/libs/ardour/kmeterdsp.cc index 181378cf76..35c95c2daf 100644 --- a/libs/ardour/kmeterdsp.cc +++ b/libs/ardour/kmeterdsp.cc @@ -52,8 +52,8 @@ void Kmeterdsp::process (float *p, int n) float s, z1, z2; // Get filter state. - z1 = _z1; - z2 = _z2; + z1 = _z1 > 50 ? 50 : (_z1 < 0 ? 0 : _z1); + z2 = _z2 > 50 ? 50 : (_z2 < 0 ? 0 : _z2); // Perform filtering. The second filter is evaluated // only every 4th sample - this is just an optimisation. @@ -75,6 +75,8 @@ void Kmeterdsp::process (float *p, int n) z2 += 4 * _omega * (z1 - z2); // Update second filter. } + if (isnan(z1)) z1 = 0; + if (isnan(z2)) z2 = 0; // Save filter state. The added constants avoid denormals. _z1 = z1 + 1e-20f; _z2 = z2 + 1e-20f; diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index fc8630d59b..30134a5dbb 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -143,6 +143,7 @@ public: LilvNode* time_Position; LilvNode* ui_GtkUI; LilvNode* ui_external; + LilvNode* ui_externalkx; private: bool _bundle_checked; @@ -562,11 +563,15 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate) if (!_impl->ui) { LILV_FOREACH(uis, i, uis) { const LilvUI* ui = lilv_uis_get(uis, i); - if (lilv_ui_is_a(ui, _world.ui_external)) { + if (lilv_ui_is_a(ui, _world.ui_externalkx)) { _impl->ui = ui; _impl->ui_type = _world.ui_external; break; } + if (lilv_ui_is_a(ui, _world.ui_external)) { + _impl->ui = ui; + _impl->ui_type = _world.ui_external; + } } } } @@ -614,7 +619,16 @@ LV2Plugin::is_external_ui() const if (!_impl->ui) { return false; } - return lilv_ui_is_a(_impl->ui, _world.ui_external); + return lilv_ui_is_a(_impl->ui, _world.ui_external) || lilv_ui_is_a(_impl->ui, _world.ui_externalkx); +} + +bool +LV2Plugin::is_external_kx() const +{ + if (!_impl->ui) { + return false; + } + return lilv_ui_is_a(_impl->ui, _world.ui_externalkx); } bool @@ -1951,10 +1965,12 @@ LV2World::LV2World() time_Position = lilv_new_uri(world, LV2_TIME__Position); ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI); ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external"); + ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget"); } LV2World::~LV2World() { + lilv_node_free(ui_externalkx); lilv_node_free(ui_external); lilv_node_free(ui_GtkUI); lilv_node_free(time_Position); diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 6a998de90e..579e54df3a 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -320,7 +320,7 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame if (!lm.locked()) { boost::shared_ptr diskstream = midi_diskstream(); framecnt_t playback_distance = diskstream->calculate_playback_distance(nframes); - if (can_internal_playback_seek(llabs(playback_distance))) { + if (can_internal_playback_seek(std::llabs(playback_distance))) { /* TODO should declick, and/or note-off */ internal_playback_seek(playback_distance); } diff --git a/libs/ardour/po/cs.po b/libs/ardour/po/cs.po index a273642491..6df4ac1894 100644 --- a/libs/ardour/po/cs.po +++ b/libs/ardour/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-06-13 22:47+0200\n" "Last-Translator: Pavel Fric \n" "Language-Team: Czech \n" @@ -545,7 +545,7 @@ msgstr "Ztrátová komprese" msgid "Lossless compression" msgstr "Bezztrátová komprese" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "Kmitočet sezení" diff --git a/libs/ardour/po/de.po b/libs/ardour/po/de.po index cedb65f3de..87cd8be124 100644 --- a/libs/ardour/po/de.po +++ b/libs/ardour/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-07-23 15:04+0200\n" "Last-Translator: Edgar Aichinger \n" "Language-Team: German \n" @@ -550,7 +550,7 @@ msgstr "Verlustbehaftete Kompression" msgid "Lossless compression" msgstr "Verlustfreie Kompression" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "Projektrate" diff --git a/libs/ardour/po/el.po b/libs/ardour/po/el.po index f91985f16b..5801300003 100644 --- a/libs/ardour/po/el.po +++ b/libs/ardour/po/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour 0.664.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2007-04-16 00:38+0200\n" "Last-Translator: Klearchos Gourgourinis \n" "Language-Team: Hellenic(Greek)\n" @@ -540,7 +540,7 @@ msgstr "" msgid "Lossless compression" msgstr "" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/po/es.po b/libs/ardour/po/es.po index 8d1697ea1f..e8f43cea11 100644 --- a/libs/ardour/po/es.po +++ b/libs/ardour/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: \n" "Last-Translator: Pablo Fernández \n" "Language-Team: Grupo de Traducción al Español \n" @@ -536,7 +536,7 @@ msgstr "" msgid "Lossless compression" msgstr "" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/po/it.po b/libs/ardour/po/it.po index e750eee71a..532e23c348 100644 --- a/libs/ardour/po/it.po +++ b/libs/ardour/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour 0.664.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2003-05-21 12:50+0500\n" "Last-Translator: Filippo Pappalardo \n" "Language-Team: Italian\n" @@ -538,7 +538,7 @@ msgstr "" msgid "Lossless compression" msgstr "" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/po/nn.po b/libs/ardour/po/nn.po index 3b45310771..e5c22966c4 100644 --- a/libs/ardour/po/nn.po +++ b/libs/ardour/po/nn.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2011-09-13 22:43+0100\n" "Last-Translator: Eivind Ødegård \n" "Language-Team: Nynorsk \n" @@ -541,7 +541,7 @@ msgstr "Komprimering med tap" msgid "Lossless compression" msgstr "Tapsfri komprimering" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "Øktrate" diff --git a/libs/ardour/po/pl.po b/libs/ardour/po/pl.po index a75f44c7f9..c9a01282a5 100644 --- a/libs/ardour/po/pl.po +++ b/libs/ardour/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2008-04-10 10:51+0100\n" "Last-Translator: Piotr Zaryk \n" "Language-Team: Polish \n" @@ -499,7 +499,7 @@ msgstr "" msgid "Lossless compression" msgstr "" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/po/ru.po b/libs/ardour/po/ru.po index 740f8a4929..1dfd367b68 100644 --- a/libs/ardour/po/ru.po +++ b/libs/ardour/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libardour 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2013-06-14 02:14+0300\n" "Last-Translator: Александр Прокудин \n" "Language-Team: русский <>\n" @@ -509,7 +509,7 @@ msgstr "Сжатие с потерями" msgid "Lossless compression" msgstr "Сжатие без потерь" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "Частота сеанса" diff --git a/libs/ardour/po/sv.po b/libs/ardour/po/sv.po index 79b8499686..2e7c6e0ddc 100644 --- a/libs/ardour/po/sv.po +++ b/libs/ardour/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ardour\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2006-10-03 01:09+GMT+1\n" "Last-Translator: Petter Sundlöf \n" "Language-Team: Swedish \n" @@ -505,7 +505,7 @@ msgstr "" msgid "Lossless compression" msgstr "" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/po/zh.po b/libs/ardour/po/zh.po index 84582f2487..1d0e8f3d44 100644 --- a/libs/ardour/po/zh.po +++ b/libs/ardour/po/zh.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Ardour 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-08-15 15:09-0400\n" +"POT-Creation-Date: 2013-09-03 07:59-0400\n" "PO-Revision-Date: 2012-08-26 13:43+0800\n" "Last-Translator: Rui-huai Zhang \n" "Language-Team: zrhzrh \n" @@ -505,7 +505,7 @@ msgstr "有损压缩" msgid "Lossless compression" msgstr "无损压缩" -#: export_format_manager.cc:207 export_format_specification.cc:579 +#: export_format_manager.cc:218 export_format_specification.cc:579 msgid "Session rate" msgstr "" diff --git a/libs/ardour/vumeterdsp.cc b/libs/ardour/vumeterdsp.cc index 67d48f6c54..a3d0ec23c1 100644 --- a/libs/ardour/vumeterdsp.cc +++ b/libs/ardour/vumeterdsp.cc @@ -43,8 +43,8 @@ void Vumeterdsp::process (float *p, int n) { float z1, z2, m, t1, t2; - z1 = _z1; - z2 = _z2; + z1 = _z1 > 20 ? 20 : (_z1 < -20 ? -20 : _z1); + z2 = _z2 > 20 ? 20 : (_z2 < -20 ? -20 : _z2); m = _res ? 0: _m; _res = false; @@ -64,6 +64,8 @@ void Vumeterdsp::process (float *p, int n) if (z2 > m) m = z2; } + if (isnan(z1)) z1 = 0; + if (isnan(z2)) z2 = 0; _z1 = z1; _z2 = z2 + 1e-10f; _m = m; diff --git a/libs/gtkmm2ext/motionfeedback.cc b/libs/gtkmm2ext/motionfeedback.cc index 221a8b0bd6..bef934eca5 100644 --- a/libs/gtkmm2ext/motionfeedback.cc +++ b/libs/gtkmm2ext/motionfeedback.cc @@ -300,7 +300,7 @@ MotionFeedback::pixwin_key_press_event (GdkEventKey *ev) case GDK_Page_Down: retval = true; - _controllable->set_value (adjust (multiplier * page_inc)); + _controllable->set_value (adjust (-multiplier * page_inc)); break; case GDK_Up: @@ -310,7 +310,7 @@ MotionFeedback::pixwin_key_press_event (GdkEventKey *ev) case GDK_Down: retval = true; - _controllable->set_value (adjust (multiplier * step_inc)); + _controllable->set_value (adjust (-multiplier * step_inc)); break; case GDK_Home: @@ -391,10 +391,10 @@ MotionFeedback::pixwin_scroll_event (GdkEventScroll* ev) if (ev->state & Keyboard::GainExtraFineScaleModifier) { scale = 0.01; } else { - scale = 0.05; + scale = 0.10; } } else { - scale = 0.25; + scale = 0.20; } switch (ev->direction) { diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h index 0c849064bb..b20771b726 100644 --- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h +++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h @@ -33,13 +33,22 @@ #include "control_protocol/basic_ui.h" #include "control_protocol/types.h" +#include "ardour/visibility.h" + +#ifdef ARDOURSURFACE_DLL_EXPORTS // defined if we are building the ARDOUR surface DLLs (instead of using them) + #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_EXPORT +#else + #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_IMPORT +#endif +#define ARDOURSURFACE_LOCAL LIBARDOUR_HELPER_DLL_LOCAL + namespace ARDOUR { class Route; class Session; class Bundle; -class ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI +class ARDOURSURFACE_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI { public: ControlProtocol (Session&, std::string name); @@ -142,7 +151,7 @@ class ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, void prev_track (uint32_t initial_id); private: - ControlProtocol (const ControlProtocol&); /* noncopyable */ + ARDOURSURFACE_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */ }; extern "C" { diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index 2ba48d5138..eb0f2cdae9 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -28,6 +28,7 @@ def build(bld): obj.export_includes = ['.', './control_protocol' ] obj.cxxflags = '-DPACKAGE="ardour_cp" -fPIC' obj.includes = ['.', './control_protocol'] + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.name = 'libardour_cp' obj.target = 'ardourcp' obj.use = 'ardour libtimecode' diff --git a/libs/surfaces/generic_midi/interface.cc b/libs/surfaces/generic_midi/interface.cc index 94edb0ba80..f90c04b0ab 100644 --- a/libs/surfaces/generic_midi/interface.cc +++ b/libs/surfaces/generic_midi/interface.cc @@ -24,7 +24,7 @@ using namespace ARDOUR; -ControlProtocol* +ControlProtocol* ARDOURSURFACE_LOCAL new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) { GenericMidiControlProtocol* gmcp; @@ -43,13 +43,13 @@ new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s return gmcp; } -void +void ARDOURSURFACE_LOCAL delete_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +bool ARDOURSURFACE_LOCAL probe_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/) { return GenericMidiControlProtocol::probe (); @@ -67,11 +67,5 @@ static ControlProtocolDescriptor generic_midi_descriptor = { destroy : delete_generic_midi_protocol }; - -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &generic_midi_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; } diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index 4cdf2602fd..ffd4dd3698 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -34,6 +34,7 @@ def build(bld): obj.includes = ['.', './generic_midi'] obj.name = 'libardour_generic_midi' obj.target = 'ardour_generic_midi' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.uselib = 'GTKMM GTK GDK' obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION diff --git a/libs/surfaces/mackie/interface.cc b/libs/surfaces/mackie/interface.cc index 294a222a6b..289f1a946d 100644 --- a/libs/surfaces/mackie/interface.cc +++ b/libs/surfaces/mackie/interface.cc @@ -29,7 +29,7 @@ using namespace ARDOUR; using namespace PBD; using namespace std; -ControlProtocol* +static ControlProtocol* new_mackie_protocol (ControlProtocolDescriptor*, Session* s) { MackieControlProtocol* mcp = 0; @@ -47,7 +47,7 @@ new_mackie_protocol (ControlProtocolDescriptor*, Session* s) return mcp; } -void +static void delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) { try @@ -66,7 +66,7 @@ delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) So anything that can be changed in the UI should not be used here to prevent loading of the lib. */ -bool +static bool probe_mackie_protocol (ControlProtocolDescriptor*) { return MackieControlProtocol::probe(); @@ -89,11 +89,4 @@ static ControlProtocolDescriptor mackie_descriptor = { }; -extern "C" { - -ControlProtocolDescriptor* -protocol_descriptor () { - return &mackie_descriptor; -} - -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; } diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index d758aadaa2..c736b3f7e6 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -291,7 +291,7 @@ Strip::notify_gain_changed (bool force_update) Control* control; - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { control = _vpot; } else { control = _fader; @@ -304,7 +304,7 @@ Strip::notify_gain_changed (bool force_update) if (force_update || normalized_position != _last_gain_position_written) { - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { if (!control->in_use()) { _surface->write (_vpot->set (normalized_position, true, Pot::wrap)); } @@ -407,7 +407,7 @@ Strip::notify_panner_width_changed (bool force_update) if (force_update || pos != _last_pan_azi_position_written) { - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { if (control == _fader) { if (!control->in_use()) { @@ -944,7 +944,7 @@ Strip::next_pot_mode () { vector::iterator i; - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { /* do not change vpot mode while in flipped mode */ DEBUG_TRACE (DEBUG::MackieControl, "not stepping pot mode - in flip mode\n"); _surface->write (display (1, "Flip")); @@ -997,7 +997,7 @@ Strip::set_vpot_parameter (Evoral::Parameter p) case PanAzimuthAutomation: pannable = _route->pannable (); if (pannable) { - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { /* gain to vpot, pan azi to fader */ _vpot->set_control (_route->gain_control()); control_by_parameter[GainAutomation] = _vpot; @@ -1025,7 +1025,7 @@ Strip::set_vpot_parameter (Evoral::Parameter p) case PanWidthAutomation: pannable = _route->pannable (); if (pannable) { - if (_surface->mcp().flip_mode() != Normal) { + if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) { /* gain to vpot, pan width to fader */ _vpot->set_control (_route->gain_control()); control_by_parameter[GainAutomation] = _vpot; diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index fe276c4e82..e097772e7a 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -46,6 +46,7 @@ def build(bld): # need ../libs because some GTK2 header files require stuff there obj.includes = ['.', '../libs'] obj.name = 'libardour_mcp' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_mcp' obj.uselib = 'GTKMM' obj.use = 'libardour libardour_cp libgtkmm2ext' diff --git a/libs/surfaces/osc/interface.cc b/libs/surfaces/osc/interface.cc index a414d4eb82..f20d898418 100644 --- a/libs/surfaces/osc/interface.cc +++ b/libs/surfaces/osc/interface.cc @@ -23,7 +23,7 @@ using namespace ARDOUR; -ControlProtocol* +static ControlProtocol* new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) { OSC* osc = new OSC (*s, Config->get_osc_port()); @@ -33,13 +33,13 @@ new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) return osc; } -void +static void delete_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +static bool probe_osc_protocol (ControlProtocolDescriptor* /*descriptor*/) { return true; // we can always do OSC @@ -57,10 +57,5 @@ static ControlProtocolDescriptor osc_descriptor = { destroy : delete_osc_protocol }; -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &osc_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; } diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index c2c12616c1..f3046658ec 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -30,6 +30,7 @@ def build(bld): obj.cxxflags = '-DPACKAGE="ardour_cp"' obj.includes = ['.', './osc'] obj.name = 'libardour_osc' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_osc' obj.uselib = ' LO ' obj.use = 'libardour libardour_cp libpbd' diff --git a/libs/surfaces/tranzport/interface.cc b/libs/surfaces/tranzport/interface.cc index 16ff22687a..3cf7090783 100644 --- a/libs/surfaces/tranzport/interface.cc +++ b/libs/surfaces/tranzport/interface.cc @@ -23,7 +23,7 @@ using namespace ARDOUR; -ControlProtocol* +static ControlProtocol* new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) { TranzportControlProtocol* tcp = new TranzportControlProtocol (*s); @@ -37,13 +37,13 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) } -void +static void delete_tranzport_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp) { delete cp; } -bool +static bool probe_tranzport_protocol (ControlProtocolDescriptor* descriptor) { return TranzportControlProtocol::probe(); @@ -62,10 +62,6 @@ static ControlProtocolDescriptor tranzport_descriptor = { }; -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &tranzport_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &tranzport_descriptor; } + diff --git a/libs/surfaces/tranzport/wscript b/libs/surfaces/tranzport/wscript index 311a9a2045..3c479e72d8 100644 --- a/libs/surfaces/tranzport/wscript +++ b/libs/surfaces/tranzport/wscript @@ -42,6 +42,7 @@ def build(bld): obj.cxxflags = '-DPACKAGE="ardour_tranzport"' obj.includes = ['.', './tranzport'] obj.name = 'libardour_tranzport' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_tranzport' obj.use = 'libardour libardour_cp' obj.vnum = LIBARDOUR_TRANZPORT_LIB_VERSION diff --git a/libs/surfaces/wiimote/interface.cc b/libs/surfaces/wiimote/interface.cc index 318bc40adf..9a704e445e 100644 --- a/libs/surfaces/wiimote/interface.cc +++ b/libs/surfaces/wiimote/interface.cc @@ -29,7 +29,7 @@ using namespace ARDOUR; using namespace PBD; -ControlProtocol* +static ControlProtocol* new_wiimote_protocol (ControlProtocolDescriptor*, Session* s) { WiimoteControlProtocol* wmcp = new WiimoteControlProtocol (*s); @@ -37,13 +37,13 @@ new_wiimote_protocol (ControlProtocolDescriptor*, Session* s) return wmcp; } -void +static void delete_wiimote_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +static bool probe_wiimote_protocol (ControlProtocolDescriptor*) { return WiimoteControlProtocol::probe (); @@ -61,13 +61,5 @@ static ControlProtocolDescriptor wiimote_descriptor = { destroy : delete_wiimote_protocol }; - -extern "C" { - -ControlProtocolDescriptor* -protocol_descriptor () { - return &wiimote_descriptor; -} - -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; } diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript index 3a4bd109c2..f565927360 100644 --- a/libs/surfaces/wiimote/wscript +++ b/libs/surfaces/wiimote/wscript @@ -28,6 +28,7 @@ def build(bld): obj.cxxflags = '-DPACKAGE="ardour_wiimote"' obj.includes = ['.', '../libs'] obj.name = 'libardour_wiimote' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_wiimote' obj.uselib = 'GTKMM CWIID' obj.use = 'libardour libardour_cp libgtkmm2ext' diff --git a/wscript b/wscript index 80dfa75339..dbb465a413 100644 --- a/wscript +++ b/wscript @@ -391,7 +391,7 @@ 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', + opt.add_option('--backtrace', action='store_true', default=True, 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)')