00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CSHELLSYNTH_INSTRUMENT_H
00028 #define CSHELLSYNTH_INSTRUMENT_H 1
00029
00030 #include <jack/jack.h>
00031 #include <cshellsynth/atomic-types.h>
00032 #include <cshellsynth/controller.h>
00033
00041 typedef struct cs_inst_struct {
00042 jack_client_t *client;
00043 jack_port_t *ctl_port;
00044 jack_port_t *out_port;
00045 atomic_float_t value;
00046 atomic_float_t ctl;
00047 } cs_inst_t;
00048
00054 #define cs_inst_destroy(cs_inst) cs_ctlr_destroy((cs_ctlr_t *) (cs_inst))
00055
00061 int cs_inst_init(cs_inst_t *self, const char *client_name, jack_options_t flags, char *server_name);
00062
00070 void cs_inst_play(cs_inst_t *self, float value);
00071
00077 void cs_inst_stop(cs_inst_t *self);
00078
00079 #endif