Mercurial > audlegacy-plugins
annotate src/paranormal-ng/paranormal.h @ 2593:f4dce14ed238
Indentation cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 May 2008 00:46:06 +0300 |
parents | 1fa3c8cd366a |
children | f1b6f1b2cdb3 |
rev | line source |
---|---|
2078
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
1 /* |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
2 * paranormal: iterated pipeline-driven visualization plugin |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
3 * Copyright (c) 2006, 2007 William Pitcock <nenolod@dereferenced.org> |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
4 * Portions copyright (c) 2001 Jamie Gennis <jgennis@mindspring.com> |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 * |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
8 * the Free Software Foundation; under version 2 of the License. |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 * |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * GNU General Public License for more details. |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
16 * along with this program; if not, write to the Free Software |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
20 #ifndef _PARANORMAL_H |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
21 #define _PARANORMAL_H |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
22 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 #include <glib.h> |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 #include <SDL.h> |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 #include <SDL_opengl.h> |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
27 #include "actuators.h" |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
28 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 struct pn_sound_data |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 { |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
31 gint16 pcm_data[2][512]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
32 gint16 freq_data[2][256]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
33 }; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
34 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
35 struct pn_image_data |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
36 { |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
37 int width, height; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
38 struct pn_color cmap[256]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
39 guchar *surface[2]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
40 }; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
41 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
42 /* The executable (ie xmms.c or standalone.c) |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
43 is responsible for allocating this and filling |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
44 it with default/saved values */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
45 struct pn_rc |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 { |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
47 struct pn_actuator *actuator; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
48 }; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
50 /* core funcs */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
51 void pn_init (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 void pn_cleanup (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 void pn_render (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
54 void pn_swap_surfaces (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
55 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
56 /* Implemented elsewhere (ie xmms.c or standalone.c) */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
57 void pn_set_rc (); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
58 void pn_fatal_error (const char *fmt, ...); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
59 void pn_error (const char *fmt, ...); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
60 void pn_quit (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
61 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
62 /* Implimented in cfg.c */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
63 void pn_configure (void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
64 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
65 /* globals used for rendering */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
66 extern struct pn_rc *pn_rc; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
67 extern struct pn_sound_data *pn_sound_data; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
68 extern struct pn_image_data *pn_image_data; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
69 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
70 extern gboolean pn_new_beat; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
71 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
72 /* global trig pre-computes */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
73 extern float sin_val[360]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
74 extern float cos_val[360]; |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
75 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
76 /* beat detection */ |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
77 int pn_is_new_beat(void); |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
78 |
1fa3c8cd366a
paranormal-ng: a GL visualiser. lots to do, most stuff won't work, but hey, this will do cool stuff too soon
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
79 #endif /* _PARANORMAL_H */ |