00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CSHELLSYNTH_TRIANGLE_H
00026 #define CSHELLSYNTH_TRIANGLE_H 1
00027
00028 #include <jack/jack.h>
00029 #include <cshellsynth/atomic-types.h>
00030 #include <cshellsynth/synth.h>
00031
00039 typedef struct cs_triangle_struct {
00040 jack_client_t *client;
00041 jack_port_t *freq_port;
00042 atomic_float_t freq;
00043 jack_port_t *out_port;
00044 atomic_float_t amp;
00045 atomic_float_t offset;
00046 atomic_float_t slope;
00047 double t;
00048 } cs_triangle_t;
00049
00055 #define cs_triangle_destroy(cs_triangle) cs_synth_destroy((cs_synth_t *) (cs_triangle))
00056
00062 int cs_triangle_init(cs_triangle_t *self, const char *client_name, jack_options_t flags, char *server_name);
00063
00067 #define cs_triangle_set_freq(cs_triangle, freq) cs_synth_set_freq((cs_synth_t *) (cs_triangle), (freq))
00068
00072 #define cs_triangle_set_offset(cs_triangle, offset) cs_synth_set_offset((cs_synth_t *) (cs_triangle), (offset))
00073
00077 #define cs_triangle_set_amp(cs_triangle, amp) cs_synth_set_amp((cs_synth_t *) (cs_triangle), (amp))
00078
00088 void cs_triangle_set_slope(cs_triangle_t *self, float slope);
00089
00090 #endif
00091