00001
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef CSHELLSYNTH_IMPULSE_TRAIN_H
00038 #define CSHELLSYNTH_IMPULSE_TRAIN_H 1
00039
00040 #include <jack/jack.h>
00041 #include <cshellsynth/atomic-types.h>
00042 #include <cshellsynth/synth.h>
00043
00051 typedef struct cs_itrain_struct {
00052 jack_client_t *client;
00053 jack_port_t *freq_port;
00054 atomic_float_t freq;
00055 jack_port_t *out_port;
00056 atomic_float_t amp;
00057 atomic_float_t offset;
00058 double t;
00059 atomic_t scale;
00060 } cs_itrain_t;
00061
00067 #define cs_itrain_destroy(cs_itrain) cs_synth_destroy((cs_synth_t *) (cs_itrain))
00068
00074 int cs_itrain_init(cs_itrain_t *self, const char *client_name, jack_options_t flags, char *server_name);
00075
00079 #define cs_itrain_set_freq(cs_itrain, freq) cs_synth_set_freq((cs_synth_t *) (cs_itrain), (freq))
00080
00084 #define cs_itrain_set_offset(cs_itrain, offset) cs_synth_set_offset((cs_synth_t *) (cs_itrain), (offset))
00085
00089 #define cs_itrain_set_amp(cs_itrain, amp) cs_synth_set_amp((cs_synth_t *) (cs_itrain), (amp))
00090
00100 void cs_itrain_set_scale(cs_itrain_t *self, int scale);
00101
00102 #endif