diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/App.cpp | 4 | ||||
-rw-r--r-- | src/gui/ConnectWindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/LoadPatchWindow.cpp | 6 | ||||
-rw-r--r-- | src/ingen/main.cpp | 6 | ||||
-rw-r--r-- | src/osc/OSCClientSender.cpp | 2 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 5 |
6 files changed, 6 insertions, 20 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 4ee1fe74..448f3903 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -16,10 +16,8 @@ */ #include <cassert> -#include <string> #include <fstream> -#include <time.h> -#include <sys/time.h> +#include <string> #include <gtk/gtkwindow.h> diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 0b1aa47d..6c5402f5 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -17,9 +17,6 @@ #include <stdlib.h> #include <string> -#include <sys/resource.h> -#include <sys/time.h> -#include <time.h> #include "raul/Process.hpp" #include "raul/log.hpp" diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index 33094bbd..64e6aa4e 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -15,8 +15,6 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <sys/types.h> -#include <dirent.h> #include <cassert> #include <boost/optional.hpp> #include <glibmm/miscutils.h> @@ -86,10 +84,8 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, // Add global examples directory to "shortcut folders" (bookmarks) const string examples_dir = Shared::data_file_path("patches"); - DIR* d = opendir(examples_dir.c_str()); - if (d != NULL) { + if (Glib::file_test(examples_dir, Glib::FILE_TEST_IS_DIR)) { add_shortcut_folder(examples_dir); - closedir(d); } } diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index 4fd477d2..4e7ba923 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -17,7 +17,6 @@ #include <signal.h> #include <stdlib.h> -#include <time.h> #include <iostream> #include <string> @@ -27,6 +26,7 @@ #include <glibmm/convert.h> #include <glibmm/miscutils.h> #include <glibmm/thread.h> +#include <glibmm/timer.h> #include "raul/Configuration.hpp" #include "raul/Path.hpp" @@ -54,8 +54,6 @@ using namespace std; using namespace Raul; using namespace Ingen; -static const timespec main_rate = { 0, 125000000 }; // 1/8 second - Ingen::Shared::World* world = NULL; void @@ -236,7 +234,7 @@ main(int argc, char** argv) // Run engine main loop until interrupt while (world->local_engine()->main_iteration()) { - nanosleep(&main_rate, NULL); + Glib::usleep(125000); // 1/8 second } info << "Finished main loop" << endl; } diff --git a/src/osc/OSCClientSender.cpp b/src/osc/OSCClientSender.cpp index ba098a61..a0b7979c 100644 --- a/src/osc/OSCClientSender.cpp +++ b/src/osc/OSCClientSender.cpp @@ -15,8 +15,6 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <unistd.h> - #include <cassert> #include <string> diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index bc9e861f..e7a07e5a 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -17,7 +17,6 @@ */ #include <stdlib.h> -#include <time.h> #include <string> #include <vector> @@ -25,6 +24,7 @@ #include <glib.h> #include <glibmm/convert.h> #include <glibmm/miscutils.h> +#include <glibmm/timer.h> #include "lv2/lv2plug.in/ns/lv2core/lv2.h" @@ -234,9 +234,8 @@ public: private: virtual void _run() { - static const timespec main_rate = { 0, 125000000 }; // 1/8 second while (_engine->main_iteration()) { - nanosleep(&main_rate, NULL); + Glib::usleep(125000); // 1/8 second } } |