00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CSHELLSYNTH_SINE_H
00026 #define CSHELLSYNTH_SINE_H 1
00027
00028 #include <jack/jack.h>
00029 #include <cshellsynth/atomic-types.h>
00030 #include <cshellsynth/synth.h>
00031
00041 typedef struct cs_sine_struct {
00042 jack_client_t *client;
00043 jack_port_t *freq_port;
00044 atomic_float_t freq;
00045 jack_port_t *out_port;
00046 atomic_float_t amp;
00047 atomic_float_t offset;
00048 double t;
00049 } cs_sine_t;
00050
00056 #define cs_sine_destroy(cs_sine) cs_synth_destroy((cs_synth_t *) (cs_sine))
00057
00063 int cs_sine_init(cs_sine_t *self, const char *client_name, jack_options_t flags, char *server_name);
00064
00068 #define cs_sine_set_freq(cs_sine, freq) cs_synth_set_freq((cs_synth_t *) (cs_sine), (freq))
00069
00073 #define cs_sine_set_offset(cs_sine, offset) cs_synth_set_offset((cs_synth_t *) (cs_sine), (offset))
00074
00078 #define cs_sine_set_amp(cs_sine, amp) cs_synth_set_amp((cs_synth_t *) (cs_sine), (amp))
00079
00080 #endif