MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
sync.h
1/* Copyright (C) 2010 Contributors
2 * For conditions of distribution and use, see copyright notice in COPYING
3 */
4
5#ifndef SYNC_H
6#define SYNC_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <stddef.h>
13
14#ifdef __GNUC__
15#define SYNC_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
16#elif defined(_MSC_VER)
17#define SYNC_DEPRECATED(msg) __declspec(deprecated("is deprecated: " msg))
18#else
19#define SYNC_DEPRECATED(msg)
20#endif
21
22struct sync_device;
23struct sync_track;
24
25struct sync_device *sync_create_device(const char *);
26void sync_destroy_device(struct sync_device *);
27
28#ifndef SYNC_PLAYER
29struct sync_cb {
30 void (*pause)( int);
31 void (*set_row)(int);
32 int (*is_playing)();
33};
34#define SYNC_DEFAULT_PORT 1338
35int sync_tcp_connect(struct sync_device *, const char *, unsigned short);
36int SYNC_DEPRECATED("use sync_tcp_connect instead") sync_connect(struct sync_device *, const char *, unsigned short);
37int sync_update(struct sync_device *, int, struct sync_cb *);
38int sync_save_tracks(const struct sync_device *);
39#endif /* defined(SYNC_PLAYER) */
40
41struct sync_io_cb {
42 void *(*open)(const char *filename, const char *mode);
43 size_t (*read)(void *ptr, size_t size, size_t nitems, void *stream);
44 int (*close)(void *stream);
45};
46void sync_set_io_cb(struct sync_device *d, struct sync_io_cb *cb);
47
48const struct sync_track *sync_get_track(struct sync_device *, const char *);
49const struct sync_track *sync_get_track_json(const char *track_name, const char *file_name);
50
51double sync_get_val(const struct sync_track *t, double row);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif /* !defined(SYNC_H) */
Definition sync.h:29
Definition device.h:69
Definition sync.h:41
Definition track.h:26