00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef CSHELLSYNTH_CLOCK_H
00027 #define CSHELLSYNTH_CLOCK_H 1
00028
00029 #include <jack/jack.h>
00030 #include <cshellsynth/atomic-types.h>
00031 #include <cshellsynth/jclient.h>
00032
00042 typedef struct cs_clock_struct {
00043 jack_client_t *client;
00044 jack_port_t *clock_port;
00045 jack_port_t *meter_port;
00046 atomic_float_t meter;
00047 jack_port_t *rate_port;
00048 atomic_float_t rate;
00049 double current;
00050 } cs_clock_t;
00051
00057 #define cs_clock_destroy(cs_clock) jclient_destroy((jclient_t *) (cs_clock))
00058
00064 int cs_clock_init(cs_clock_t *self, const char *client_name, jack_options_t flags, char *server_name);
00065
00071 void cs_clock_set_meter(cs_clock_t *self, float meter);
00072
00082 void cs_clock_set_rate(cs_clock_t *self, float rate);
00083
00084 #endif