00001
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef CSHELLSYNTH_DSF_H
00040 #define CSHELLSYNTH_DSF_H 1
00041
00042 #include <jack/jack.h>
00043 #include <cshellsynth/atomic-types.h>
00044 #include <cshellsynth/synth.h>
00045
00053 typedef struct cs_dsf_struct {
00054 jack_client_t *client;
00055 jack_port_t *freq_port;
00056 atomic_float_t freq;
00057 jack_port_t *out_port;
00058 atomic_float_t amp;
00059 atomic_float_t offset;
00060 double t;
00061 jack_port_t *bright_port;
00062 atomic_float_t bright;
00063 atomic_t scale;
00064 } cs_dsf_t;
00065
00071 #define cs_dsf_destroy(cs_dsf) cs_synth_destroy((cs_synth_t *) (cs_dsf))
00072
00078 int cs_dsf_init(cs_dsf_t *self, const char *client_name, jack_options_t flags, char *server_name);
00079
00083 #define cs_dsf_set_freq(cs_dsf, freq) cs_synth_set_freq((cs_synth_t *) (cs_dsf), (freq))
00084
00088 #define cs_dsf_set_offset(cs_dsf, offset) cs_synth_set_offset((cs_synth_t *) (cs_dsf), (offset))
00089
00093 #define cs_dsf_set_amp(cs_dsf, amp) cs_synth_set_amp((cs_synth_t *) (cs_dsf), (amp))
00094
00102 void cs_dsf_set_bright(cs_dsf_t *self, float bright);
00103
00111 void cs_dsf_set_scale(cs_dsf_t *self, int scale);
00112
00113 #endif