Mercurial > audlegacy-plugins
comparison src/blur_scope/blur_scope.c @ 1141:782f22f642d8 trunk
[svn] - blur_scope: convert to plugin2 architecture.
author | nenolod |
---|---|
date | Mon, 28 May 2007 02:59:10 -0700 |
parents | 2cf4d0182a86 |
children | 761e17b23e0c |
comparison
equal
deleted
inserted
replaced
1140:054fa57ecfb1 | 1141:782f22f642d8 |
---|---|
66 | 66 |
67 | 67 |
68 VisPlugin bscope_vp = { | 68 VisPlugin bscope_vp = { |
69 NULL, | 69 NULL, |
70 NULL, | 70 NULL, |
71 NULL, /* description */ | 71 "Blur Scope", /* description */ |
72 1, /* Number of PCM channels wanted */ | 72 1, /* Number of PCM channels wanted */ |
73 0, /* Number of freq channels wanted */ | 73 0, /* Number of freq channels wanted */ |
74 bscope_init, /* init */ | 74 bscope_init, /* init */ |
75 bscope_cleanup, /* cleanup */ | 75 bscope_cleanup, /* cleanup */ |
76 NULL, /* about */ | 76 NULL, /* about */ |
80 bscope_playback_stop, /* playback_stop */ | 80 bscope_playback_stop, /* playback_stop */ |
81 bscope_render_pcm, /* render_pcm */ | 81 bscope_render_pcm, /* render_pcm */ |
82 NULL /* render_freq */ | 82 NULL /* render_freq */ |
83 }; | 83 }; |
84 | 84 |
85 VisPlugin * | 85 VisPlugin *bscope_vplist[] = { &bscope_vp, NULL }; |
86 get_vplugin_info(void) | 86 |
87 { | 87 DECLARE_PLUGIN(bscope, NULL, NULL, NULL, NULL, NULL, NULL, bscope_vplist); |
88 bscope_vp.description = g_strdup("Blur Scope"); | |
89 return &bscope_vp; | |
90 } | |
91 | 88 |
92 #define WIDTH 256 | 89 #define WIDTH 256 |
93 #define HEIGHT 128 | 90 #define HEIGHT 128 |
94 #define min(x,y) ((x)<(y)?(x):(y)) | 91 #define min(x,y) ((x)<(y)?(x):(y)) |
95 #define BPL ((WIDTH + 2)) | 92 #define BPL ((WIDTH + 2)) |
223 } | 220 } |
224 | 221 |
225 static void | 222 static void |
226 bscope_cleanup(void) | 223 bscope_cleanup(void) |
227 { | 224 { |
228 g_free(bscope_vp.description); | |
229 bscope_vp.description = NULL; | |
230 if (window) | 225 if (window) |
231 gtk_widget_destroy(window); | 226 gtk_widget_destroy(window); |
232 if (bg_pixmap) { | 227 if (bg_pixmap) { |
233 g_object_unref(bg_pixmap); | 228 g_object_unref(bg_pixmap); |
234 bg_pixmap = NULL; | 229 bg_pixmap = NULL; |