utils: use g_usleep() instead of my_usleep()
Now that I've found this nice function in the GLib docs, we can finally remove our custom sleep function. Still all those callers of g_usleep() have to be migrated one day to use events, instead of regular polling.
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "../output_api.h"
|
||||
#include "../utils.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
@@ -421,7 +420,7 @@ mpd_jack_play(void *data, const char *buff, size_t size)
|
||||
} else {
|
||||
/* XXX do something more intelligent to
|
||||
synchronize */
|
||||
my_usleep(1000);
|
||||
g_usleep(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
#include "../output_api.h"
|
||||
#include "../utils.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
@@ -171,7 +170,7 @@ osx_render(void *vdata,
|
||||
buffer->mDataByteSize = bufferSize;
|
||||
|
||||
if (!bufferSize) {
|
||||
my_usleep(1000);
|
||||
g_usleep(1000);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user