00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CSHELLNOISE_NOISE_H
00026 #define CSHELLNOISE_NOISE_H 1
00027
00028 #include <jack/jack.h>
00029 #include <cshellsynth/jclient.h>
00030 #include <cshellsynth/atomic-types.h>
00031
00039 typedef struct cs_noise_struct {
00040 jack_client_t *client;
00041 jack_port_t *out_port;
00042 atomic_float_t amp;
00043 atomic_float_t offset;
00044 atomic_t kind;
00045 float state[3];
00046 } cs_noise_t;
00047
00051 #define cs_noise_destroy(cs_noise) jclient_destroy((jclient_t *) (cs_noise))
00052
00056 int cs_noise_init(cs_noise_t *self, const char *client_name, jack_options_t flags, char *server_name);
00057
00068 void cs_noise_set_kind(cs_noise_t *self, int kind);
00069
00073 void cs_noise_set_offset(cs_noise_t *self, float offset);
00074
00078 void cs_noise_set_amp(cs_noise_t *self, float amp);
00079
00080 #define CS_WHITE 1
00081 #define CS_PINK 2
00082 #define CS_RED 3
00083
00084 #endif