Mercurial > audlegacy-plugins
comparison src/rovascope/paranormal.h @ 408:290588854a9d trunk
[svn] - rovascope -- a variant of the paranormal visualization engine that is
uses random data instead of presets.
author | nenolod |
---|---|
date | Sat, 06 Jan 2007 01:57:34 -0800 |
parents | src/paranormal/paranormal.h@b185ed2f8fa2 |
children | f305ebcc8136 |
comparison
equal
deleted
inserted
replaced
407:3c0cb7e84e0d | 408:290588854a9d |
---|---|
1 #ifndef _PARANORMAL_H | |
2 #define _PARANORMAL_H | |
3 | |
4 #include <glib.h> | |
5 | |
6 #include "actuators.h" | |
7 | |
8 struct pn_sound_data | |
9 { | |
10 gint16 pcm_data[2][512]; | |
11 gint16 freq_data[2][256]; | |
12 }; | |
13 | |
14 struct pn_image_data | |
15 { | |
16 int width, height; | |
17 struct pn_color cmap[256]; | |
18 guchar *surface[2]; | |
19 }; | |
20 | |
21 /* The executable (ie xmms.c or standalone.c) | |
22 is responsible for allocating this and filling | |
23 it with default/saved values */ | |
24 struct pn_rc | |
25 { | |
26 struct pn_actuator *actuator; | |
27 }; | |
28 | |
29 /* core funcs */ | |
30 void pn_init (void); | |
31 void pn_cleanup (void); | |
32 void pn_render (void); | |
33 void pn_swap_surfaces (void); | |
34 | |
35 /* Implemented elsewhere (ie xmms.c or standalone.c) */ | |
36 void pn_set_rc (); | |
37 void pn_fatal_error (const char *fmt, ...); | |
38 void pn_error (const char *fmt, ...); | |
39 void pn_quit (void); | |
40 | |
41 /* Implimented in cfg.c */ | |
42 void pn_configure (void); | |
43 | |
44 /* globals used for rendering */ | |
45 extern struct pn_rc *pn_rc; | |
46 extern struct pn_sound_data *pn_sound_data; | |
47 extern struct pn_image_data *pn_image_data; | |
48 | |
49 extern gboolean pn_new_beat; | |
50 | |
51 /* global trig pre-computes */ | |
52 extern float sin_val[360]; | |
53 extern float cos_val[360]; | |
54 | |
55 /* beat detection */ | |
56 int pn_is_new_beat(void); | |
57 | |
58 struct pn_actuator *rovascope_get_random_colourmap(void); | |
59 struct pn_actuator *rovascope_get_random_general(void); | |
60 struct pn_actuator *rovascope_get_random_normal_scope(void); | |
61 | |
62 struct pn_actuator *rovascope_get_random_actuator(void); | |
63 | |
64 #endif /* _PARANORMAL_H */ |