summaryrefslogtreecommitdiff
path: root/src/xine-engine/metronom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/metronom.c')
-rw-r--r--src/xine-engine/metronom.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index fa33da9e1..42aed4e76 100644
--- a/src/xine-engine/metronom.c
+++ b/src/xine-engine/metronom.c
@@ -15,9 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: metronom.c,v 1.144 2007/02/20 00:34:57 dgp85 Exp $
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
#ifdef HAVE_CONFIG_H
@@ -42,9 +40,9 @@
#define METRONOM_INTERNAL
#define METRONOM_CLOCK_INTERNAL
-#include "xine_internal.h"
-#include "metronom.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/metronom.h>
+#include <xine/xineutils.h>
#define MAX_AUDIO_DELTA 1600
#define AUDIO_SAMPLE_NUM 32768
@@ -178,7 +176,6 @@ static scr_plugin_t* unixscr_init () {
unixscr_t *this;
this = (unixscr_t *) xine_xmalloc(sizeof(unixscr_t));
- memset(this, 0, sizeof(*this));
this->scr.interface_version = 3;
this->scr.get_priority = unixscr_get_priority;
@@ -851,7 +848,8 @@ static void metronom_unregister_scr (metronom_clock_t *this, scr_plugin_t *scr)
this->scr_master = get_master_scr(this);
}
-static int metronom_sync_loop (metronom_clock_t *this) {
+static void *metronom_sync_loop (void *const this_gen) {
+ metronom_clock_t *const this = (metronom_clock_t *const)this_gen;
struct timeval tv;
struct timespec ts;
@@ -874,7 +872,7 @@ static int metronom_sync_loop (metronom_clock_t *this) {
pthread_mutex_unlock (&this->lock);
}
- return 0;
+ return NULL;
}
static void metronom_exit (metronom_t *this) {
@@ -990,7 +988,7 @@ metronom_clock_t *_x_metronom_clock_init(xine_t *xine)
this->thread_running = 1;
if ((err = pthread_create(&this->sync_thread, NULL,
- (void*(*)(void*)) metronom_sync_loop, this)) != 0)
+ metronom_sync_loop, this)) != 0)
xprintf(this->xine, XINE_VERBOSITY_NONE, "cannot create sync thread (%s)\n",
strerror(err));