switch from using Sleep/usleep to Glib::usleep() (and remember that we need to make Glib::usleep() actually work on windows one day)
This commit is contained in:
parent
0258f2958b
commit
69df7763a1
|
@ -753,7 +753,7 @@ ARDOUR_UI::starting ()
|
|||
// wait for announce reply from nsm server
|
||||
for ( i = 0; i < 5000; ++i) {
|
||||
nsm->check ();
|
||||
usleep (i);
|
||||
Glib::usleep (i);
|
||||
if (nsm->is_active()) {
|
||||
break;
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ ARDOUR_UI::starting ()
|
|||
// wait for open command from nsm server
|
||||
for ( i = 0; i < 5000; ++i) {
|
||||
nsm->check ();
|
||||
usleep (1000);
|
||||
Glib::usleep (1000);
|
||||
if (nsm->client_id ()) {
|
||||
break;
|
||||
}
|
||||
|
@ -3506,7 +3506,7 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
|
|||
}
|
||||
int timeout = 120; // 6 sec
|
||||
while (!ARDOUR_UI::instance()->video_timeline->check_server()) {
|
||||
usleep (50000);
|
||||
Glib::usleep (50000);
|
||||
if (--timeout <= 0 || !video_server_process->is_running()) break;
|
||||
}
|
||||
if (timeout <= 0) {
|
||||
|
|
|
@ -3481,7 +3481,7 @@ Editor::freeze_route ()
|
|||
|
||||
/* wait for just a little while, because the above call is asynchronous */
|
||||
|
||||
::usleep (250000);
|
||||
Glib::usleep (250000);
|
||||
|
||||
if (clicked_routeview == 0 || !clicked_routeview->is_audio_track()) {
|
||||
return;
|
||||
|
|
|
@ -93,7 +93,7 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
|
|||
if(gtk_events_pending()){
|
||||
gtk_main_iteration();
|
||||
}else {
|
||||
usleep(10000);
|
||||
Glib::usleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -572,7 +572,7 @@ ExportVideoDialog::launch_export ()
|
|||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
usleep (10000);
|
||||
Glib::usleep (10000);
|
||||
}
|
||||
}
|
||||
audio_progress_connection.disconnect();
|
||||
|
|
|
@ -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*/
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ LXVSTPluginUI::get_XID ()
|
|||
*/
|
||||
|
||||
while (!(_vst->state()->been_activated)) {
|
||||
usleep (1000);
|
||||
Glib::usleep (1000);
|
||||
}
|
||||
|
||||
int const id = _vst->state()->xid;
|
||||
|
|
|
@ -537,7 +537,7 @@ SystemExec::terminate ()
|
|||
|
||||
if (pid) {
|
||||
::kill(pid, SIGTERM);
|
||||
::usleep(50000);
|
||||
usleep(50000);
|
||||
sched_yield();
|
||||
wait(WNOHANG);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user