00001
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 #ifndef CSHELLSYNTH_DISTORTION_H
00061 #define CSHELLSYNTH_DISTORTION_H 1
00062
00063 #include <jack/jack.h>
00064 #include <cshellsynth/atomic-types.h>
00065 #include <cshellsynth/filter.h>
00066
00074 typedef struct cs_distort_struct {
00075 jack_client_t *client;
00076 jack_port_t *in_port;
00077 atomic_float_t in;
00078 jack_port_t *out_port;
00079 jack_port_t *gain_port;
00080 atomic_float_t gain;
00081 atomic_float_t sharpness;
00082 atomic_t kind;
00083 } cs_distort_t;
00084
00090 #define cs_distort_destroy(cs_distort) cs_filter_destroy((cs_filter_t *) (cs_distort))
00091
00097 int cs_distort_init(cs_distort_t *self, const char *client_name, jack_options_t flags, char *server_name);
00098
00109 void cs_distort_set_kind(cs_distort_t *self, int kind);
00110
00114 #define cs_distort_set_in(self, in) cs_filter_set_in(self, in)
00115
00124 void cs_distort_set_gain(cs_distort_t *self, float gain);
00125
00134 void cs_distort_set_sharpness(cs_distort_t *self, float sharpness);
00135
00136 #define CS_EXP 1
00137 #define CS_HYP 2
00138 #define CS_ATAN 3
00139 #define CS_TUBE 4
00140
00141 #endif