port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
#include "usync.h"
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
if (usync_init() < 0)
abort();
#ifndef SYNC_PLAYER
/* HACK: prefetch tracks - not needed when actually editing */
usync_get_val(foo);
sleep(1);
usync_update(0.0f);
#endif
float row = 0.0f;
while (row <= 8.0f) {
usync_update(row);
printf("%f: %f\n", row, usync_get_val(foo));
row += 1.0f / 4; /* step one 4th of a row */
}
usync_export();
}
#ifndef SYNC_PLAYER
static void pause(void *d, int flag)
{
/* TODO*/
}
static void set_row(void *d, int row)
{
/* TODO*/
}
static int is_playing(void *d)
{
/* TODO */
}
struct sync_cb usync_cb = {
pause,
set_row,
is_playing
};
void *usync_data = NULL;
#endif