diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2002-02-01 19:28:30 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2002-02-01 19:28:30 +0000 |
commit | 4d3b1472e78ac7c12460b26914c9a294a3de573a (patch) | |
tree | 4d9b1f0a6698385b086e37381b75b2d93bf85e39 /gst/goom/goom_tools.h | |
parent | e5faa112b67c7681f653949413799180c7382451 (diff) |
Added a goom plugin (goom.sourceforge.net) to test: ./gst-launch filesrc location=/opt/data/south.mp3 ! mad ! tee sil...
Original commit message from CVS:
Added a goom plugin (goom.sourceforge.net)
to test:
./gst-launch filesrc location=/opt/data/south.mp3 ! mad ! tee silent=true src%d! goom ! colorspace ! xvideosink tee0.src%d! osssink
Diffstat (limited to 'gst/goom/goom_tools.h')
-rw-r--r-- | gst/goom/goom_tools.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gst/goom/goom_tools.h b/gst/goom/goom_tools.h new file mode 100644 index 00000000..d077c0cb --- /dev/null +++ b/gst/goom/goom_tools.h @@ -0,0 +1,29 @@ +#ifndef _GOOMTOOLS_H +#define _GOOMTOOLS_H + +#define NB_RAND 0x10000 + +/* in graphic.c */ +extern int * rand_tab ; +extern unsigned short rand_pos ; + +#define RAND_INIT(i) \ + srand (i) ;\ + if (!rand_tab)\ + rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\ + rand_pos = 1 ;\ + while (rand_pos != 0)\ + rand_tab [rand_pos++] = rand () ; + +#define RAND()\ + (rand_tab[rand_pos = rand_pos + 1]) + +#define RAND_CLOSE()\ + free (rand_tab);\ + rand_tab = 0; + + +//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) +#define iRAND(i) (RAND()%i) + +#endif |