diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/automation_line.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/export_range_markers_dialog.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/linux_vst_gui_support.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/lxvst_plugin_ui.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/main.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/plugin_eq_gui.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/system_exec.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/system_exec.h | 9 | ||||
-rw-r--r-- | gtk2_ardour/utils_videotl.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/wscript | 9 |
11 files changed, 31 insertions, 25 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index a2a5f0a385..a771ed48b9 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -759,7 +759,7 @@ ARDOUR_UI::starting () nsm->check (); Glib::usleep (i); - if (nsm->is_active()) + if (nsm->is_active()) { break; } } @@ -770,9 +770,8 @@ ARDOUR_UI::starting () // wait for open command from nsm server for ( i = 0; i < 5000; ++i) { nsm->check (); - Glib::usleep (1000); - if (nsm->client_id ()) + if (nsm->client_id ()) { break; } } diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 2551b40c75..9fe1e0fa19 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -19,13 +19,9 @@ #ifdef COMPILER_MSVC #include <float.h> - -// 'std::isinf()' and 'std::isnan()' are not available in MSVC. +/* isinf() & isnan() are C99 standards, which older MSVC doesn't provide */ #define isinf(val) !((bool)_finite((double)val)) #define isnan(val) (bool)_isnan((double)val) -#else -using std::isnan; -using std::isinf; #endif #include <cmath> diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc index 4b99162974..97a8dba25f 100644 --- a/gtk2_ardour/export_range_markers_dialog.cc +++ b/gtk2_ardour/export_range_markers_dialog.cc @@ -93,7 +93,7 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList& if(gtk_events_pending()){ gtk_main_iteration(); }else { - usleep(10000); + Glib::usleep(10000); } } diff --git a/gtk2_ardour/linux_vst_gui_support.cc b/gtk2_ardour/linux_vst_gui_support.cc index 6eec688a7c..4d90bdd4aa 100644 --- a/gtk2_ardour/linux_vst_gui_support.cc +++ b/gtk2_ardour/linux_vst_gui_support.cc @@ -33,6 +33,7 @@ #include <pthread.h> #include <signal.h> #include <glib.h> +#include <glibmm/timer.h> #include "ardour/linux_vst_support.h" @@ -377,7 +378,7 @@ void* gui_event_loop (void* ptr) /*We don't want to use all the CPU.. */ - usleep(1000); + Glib::usleep(1000); LXVST_sched_event_timer++; @@ -706,7 +707,7 @@ vstfx_launch_editor (VSTState* vstfx) /*QUIRK - some plugins need a slight delay after opening the editor before you can ask the window size or they might return zero - specifically discoDSP */ - usleep(100000); + Glib::usleep(100000); /*Now we can find out how big the parent window should be (and try) to resize it*/ diff --git a/gtk2_ardour/lxvst_plugin_ui.cc b/gtk2_ardour/lxvst_plugin_ui.cc index d31038755b..e3335d4990 100644 --- a/gtk2_ardour/lxvst_plugin_ui.cc +++ b/gtk2_ardour/lxvst_plugin_ui.cc @@ -141,7 +141,7 @@ LXVSTPluginUI::get_XID () */ while (!(_vst->state()->been_activated)) { - usleep (1000); + Glib::usleep (1000); } int const id = _vst->state()->xid; diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index de56b1e387..d212edef92 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -175,8 +175,8 @@ fixup_bundle_environment (int, char* []) export_search_path (bundle_dir, "VAMP_PATH", "/lib"); export_search_path (bundle_dir, "GTK_PATH", "/lib/gtkengines"); - setenv ("SUIL_MODULE_DIR", (bundle_dir + "/lib").c_str(), 1); - setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(getenv ("PATH"))).c_str(), 1); + g_setenv ("SUIL_MODULE_DIR", (bundle_dir + "/lib").c_str(), 1); + g_setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(g_getenv ("PATH"))).c_str(), 1); /* unset GTK_RC_FILES so that we only load the RC files that we define */ @@ -285,8 +285,8 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) export_search_path (dir_path, "VAMP_PATH", "/lib"); export_search_path (dir_path, "GTK_PATH", "/lib/gtkengines"); - setenv ("SUIL_MODULE_DIR", (dir_path + "/lib").c_str(), 1); - setenv ("PATH", (dir_path + "/bin:" + std::string(getenv ("PATH"))).c_str(), 1); + g_setenv ("SUIL_MODULE_DIR", (dir_path + "/lib").c_str(), 1); + g_setenv ("PATH", (dir_path + "/bin:" + std::string(g_getenv ("PATH"))).c_str(), 1); /* unset GTK_RC_FILES so that we only load the RC files that we define */ diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 4bf2a5f879..9a91d0c124 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -20,13 +20,9 @@ #ifdef COMPILER_MSVC #include <float.h> - -// 'std::isinf()' and 'std::isnan()' are not available in MSVC. +/* isinf() & isnan() are C99 standards, which older MSVC doesn't provide */ #define isinf(val) !((bool)_finite((double)val)) #define isnan(val) (bool)_isnan((double)val) -#else -using std::isnan; -using std::isinf; #endif #include "plugin_eq_gui.h" diff --git a/gtk2_ardour/system_exec.cc b/gtk2_ardour/system_exec.cc index 1a8399d22e..034ba90e40 100644 --- a/gtk2_ardour/system_exec.cc +++ b/gtk2_ardour/system_exec.cc @@ -540,7 +540,7 @@ SystemExec::terminate () if (pid) { ::kill(pid, SIGTERM); - ::usleep(50000); + usleep(50000); sched_yield(); wait(WNOHANG); } diff --git a/gtk2_ardour/system_exec.h b/gtk2_ardour/system_exec.h index 38589bb26f..c69f957d95 100644 --- a/gtk2_ardour/system_exec.h +++ b/gtk2_ardour/system_exec.h @@ -30,6 +30,15 @@ #define STDERR_FILENO 2 #endif +#if defined (__MINGW64__) +#include <windows.h> + +#ifdef interface +#undef interface // VKamyshniy: to avoid "include/giomm-2.4/giomm/dbusmessage.h:270:94: error: expected ',' or '...' before 'struct'" +#endif + +#endif + #include <string> #include <pthread.h> #include <signal.h> diff --git a/gtk2_ardour/utils_videotl.cc b/gtk2_ardour/utils_videotl.cc index ed1bfad766..2e250b2cee 100644 --- a/gtk2_ardour/utils_videotl.cc +++ b/gtk2_ardour/utils_videotl.cc @@ -325,7 +325,7 @@ extern "C" { struct A3MemoryStruct chunk; long int httpstatus; if (status) *status = 0; - //usleep(500000); return NULL; // TEST & DEBUG + //Glib::usleep(500000); return NULL; // TEST & DEBUG if (strncmp("http://", u, 7)) return NULL; chunk.data=NULL; diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 578409c4ae..41d5a269f6 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -3,6 +3,7 @@ from waflib.extras import autowaf as autowaf from waflib import Options, TaskGen import waflib.Logs as Logs, waflib.Utils as Utils import os +import shutil import sys import re import time @@ -630,7 +631,7 @@ def build(bld): obj.install_path = None set_subst_dict(obj, light_rc_subst_dict) - obj = bld(rule = 'cp ${SRC} ${TGT}') + obj = bld(rule = autowaf.copyfile) obj.source = [ 'ardour3_widget_list.rc' ] obj.target = 'ardour3_widgets.rc' obj.install_path = None @@ -672,11 +673,15 @@ def build(bld): # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad', # 'SAE-us-nokeypad', 'ergonomic-us' + # + # explicitly state the use of perl here so that it works on windows too + # + a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] ) for b in [ 'mnemonic-us' ] : obj = bld( target = b + '.bindings', source = b + '.bindings.in', - rule = '../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] ) + rule = a_rule ) obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3') |