Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

custom_wave_types.h

00001 #ifndef CUSTOM_WAVE_TYPES_H
00002 #define CUSTOM_WAVE_TYPES_H
00003 #include "common.h"
00004 #include "splaytree_types.h"
00005 #include "expr_types.h"
00006 
00007 #define X_POINT_OP 0
00008 #define Y_POINT_OP 1
00009 #define R_POINT_OP 2
00010 #define G_POINT_OP 3
00011 #define B_POINT_OP 4
00012 #define A_POINT_OP 5
00013 #define NUM_POINT_OPS 6
00014 
00015 typedef struct PER_POINT_EQN_T {
00016   int index;
00017   param_t * param;
00018   gen_expr_t * gen_expr;        
00019 } per_point_eqn_t;
00020 
00021 typedef struct CUSTOM_WAVE_T {
00022 
00023   /* Numerical id */
00024   int id;
00025   int per_frame_count;
00026 
00027   /* Parameter tree associated with this custom wave */
00028   splaytree_t * param_tree;
00029 
00030 
00031   /* Engine variables */
00032 
00033   double x; /* x position for per point equations */
00034   double y; /* y position for per point equations */
00035   double r; /* red color value */
00036   double g; /* green color value */
00037   double b; /* blue color value */
00038   double a; /* alpha color value */
00039   double * x_mesh;
00040   double * y_mesh;
00041   double * r_mesh;
00042   double * b_mesh;
00043   double * g_mesh;
00044   double * a_mesh;
00045   double * value1;
00046   double * value2;
00047   double * sample_mesh;
00048 
00049   int enabled; /* if nonzero then wave is visible, hidden otherwise */
00050   int samples; /* number of samples associated with this wave form. Usually powers of 2 */
00051   double sample;
00052   int bSpectrum; /* spectrum data or pcm data */
00053   int bUseDots; /* draw wave as dots or lines */
00054   int bDrawThick; /* draw thicker lines */
00055   int bAdditive; /* add color values together */
00056 
00057   double scaling; /* scale factor of waveform */
00058   double smoothing; /* smooth factor of waveform */
00059   int sep;  /* no idea what this is yet... */
00060 
00061   /* stupid t variables */
00062   double t1;
00063   double t2;
00064   double t3;
00065   double t4;
00066   double t5;
00067   double t6;
00068   double t7;
00069   double t8;
00070   double v1,v2;
00071   /* Data structure to hold per frame and per point equations */
00072   splaytree_t * init_cond_tree;
00073   splaytree_t * per_frame_eqn_tree;
00074   splaytree_t * per_point_eqn_tree;
00075   splaytree_t * per_frame_init_eqn_tree;
00076 
00077   /* Denotes the index of the last character for each string buffer */
00078   int per_point_eqn_string_index;
00079   int per_frame_eqn_string_index;
00080   int per_frame_init_eqn_string_index;
00081 
00082   /* String buffers for per point and per frame equations */
00083   char per_point_eqn_string_buffer[STRING_BUFFER_SIZE];
00084   char per_frame_eqn_string_buffer[STRING_BUFFER_SIZE];
00085   char per_frame_init_eqn_string_buffer[STRING_BUFFER_SIZE];
00086   /* Per point equation array */
00087   gen_expr_t * per_point_eqn_array[NUM_POINT_OPS];
00088   
00089 } custom_wave_t;
00090 
00091 
00092 #endif

Generated on Tue Dec 20 10:14:56 2005 for vlc-0.8.4a by  doxygen 1.4.2