1 #ifndef CUSTOM_WAVE_TYPES_H
2 #define CUSTOM_WAVE_TYPES_H
4 #include "splaytree_types.h"
5 #include "expr_types.h"
13 #define NUM_POINT_OPS 6
15 typedef struct PER_POINT_EQN_T {
18 gen_expr_t * gen_expr;
21 typedef struct CUSTOM_WAVE_T {
27 /* Parameter tree associated with this custom wave */
28 splaytree_t * param_tree;
31 /* Engine variables */
33 double x; /* x position for per point equations */
34 double y; /* y position for per point equations */
35 double r; /* red color value */
36 double g; /* green color value */
37 double b; /* blue color value */
38 double a; /* alpha color value */
49 int enabled; /* if nonzero then wave is visible, hidden otherwise */
50 int samples; /* number of samples associated with this wave form. Usually powers of 2 */
52 int bSpectrum; /* spectrum data or pcm data */
53 int bUseDots; /* draw wave as dots or lines */
54 int bDrawThick; /* draw thicker lines */
55 int bAdditive; /* add color values together */
57 double scaling; /* scale factor of waveform */
58 double smoothing; /* smooth factor of waveform */
59 int sep; /* no idea what this is yet... */
61 /* stupid t variables */
71 /* Data structure to hold per frame and per point equations */
72 splaytree_t * init_cond_tree;
73 splaytree_t * per_frame_eqn_tree;
74 splaytree_t * per_point_eqn_tree;
75 splaytree_t * per_frame_init_eqn_tree;
77 /* Denotes the index of the last character for each string buffer */
78 int per_point_eqn_string_index;
79 int per_frame_eqn_string_index;
80 int per_frame_init_eqn_string_index;
82 /* String buffers for per point and per frame equations */
83 char per_point_eqn_string_buffer[STRING_BUFFER_SIZE];
84 char per_frame_eqn_string_buffer[STRING_BUFFER_SIZE];
85 char per_frame_init_eqn_string_buffer[STRING_BUFFER_SIZE];
86 /* Per point equation array */
87 gen_expr_t * per_point_eqn_array[NUM_POINT_OPS];