Mercurial > audlegacy
annotate src/audacious/ui_svis.c @ 3369:676bfd7b6586 trunk
simplified the custom plugin menuentries system, expecially for ui files
author | Giacomo Lozito <james@develia.org> |
---|---|
date | Sun, 19 Aug 2007 13:57:53 +0200 |
parents | f02623377013 |
children | 75d99359357b |
rev | line source |
---|---|
3054 | 1 /* |
2 * Audacious - a cross-platform multimedia player | |
3 * Copyright (c) 2007 Audacious development team. | |
4 * | |
5 * Based on: | |
6 * BMP - Cross-platform multimedia player | |
7 * Copyright (C) 2003-2004 BMP development team. | |
8 * XMMS: | |
9 * Copyright (C) 1998-2003 XMMS development team. | |
10 * | |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3054
diff
changeset
|
13 * the Free Software Foundation; under version 3 of the License. |
3054 | 14 * |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3054
diff
changeset
|
21 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
22 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
23 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
24 * Audacious or using our public API to be a derived work. |
3054 | 25 */ |
26 | |
3251 | 27 #include "skin.h" |
3054 | 28 #include "ui_svis.h" |
29 #include "ui_vis.h" | |
30 #include "main.h" | |
31 #include "util.h" | |
32 #include "strings.h" | |
33 #include "playback.h" | |
34 #include <string.h> | |
35 #include <ctype.h> | |
36 #include <gtk/gtkmain.h> | |
37 #include <gtk/gtkmarshal.h> | |
38 #include <gtk/gtkimage.h> | |
39 | |
40 #define UI_TYPE_SVIS (ui_svis_get_type()) | |
41 | |
42 static gint svis_redraw_delays[] = { 1, 2, 4, 8 }; | |
43 | |
44 /* FIXME: Are the svis_scope_colors correct? */ | |
45 static guint8 svis_scope_colors[] = { 20, 19, 18, 19, 20 }; | |
46 static guint8 svis_vu_normal_colors[] = { 17, 17, 17, 12, 12, 12, 2, 2 }; | |
47 | |
48 #define DRAW_DS_PIXEL(ptr,value) \ | |
49 *(ptr) = (value); \ | |
50 *((ptr) + 1) = (value); \ | |
51 *((ptr) + 76) = (value); \ | |
52 *((ptr) + 77) = (value); | |
53 | |
54 #define SVIS_HEIGHT 5 | |
55 #define SVIS_WIDTH 38 | |
56 | |
57 enum { | |
58 DOUBLED, | |
59 LAST_SIGNAL | |
60 }; | |
61 | |
62 static void ui_svis_class_init (UiSVisClass *klass); | |
63 static void ui_svis_init (UiSVis *svis); | |
64 static void ui_svis_destroy (GtkObject *object); | |
65 static void ui_svis_realize (GtkWidget *widget); | |
66 static void ui_svis_unrealize (GtkWidget *widget); | |
67 static void ui_svis_map (GtkWidget *widget); | |
68 static void ui_svis_unmap (GtkWidget *widget); | |
69 static void ui_svis_size_request (GtkWidget *widget, GtkRequisition *requisition); | |
70 static void ui_svis_size_allocate (GtkWidget *widget, GtkAllocation *allocation); | |
71 static gboolean ui_svis_expose (GtkWidget *widget, GdkEventExpose *event); | |
72 static void ui_svis_toggle_doublesize (UiSVis *svis); | |
73 | |
74 static GtkWidgetClass *parent_class = NULL; | |
75 static guint vis_signals[LAST_SIGNAL] = { 0 }; | |
76 | |
77 GType ui_svis_get_type() { | |
78 static GType vis_type = 0; | |
79 if (!vis_type) { | |
80 static const GTypeInfo vis_info = { | |
81 sizeof (UiSVisClass), | |
82 NULL, | |
83 NULL, | |
84 (GClassInitFunc) ui_svis_class_init, | |
85 NULL, | |
86 NULL, | |
87 sizeof (UiSVis), | |
88 0, | |
89 (GInstanceInitFunc) ui_svis_init, | |
90 }; | |
91 vis_type = g_type_register_static (GTK_TYPE_WIDGET, "UiSVis", &vis_info, 0); | |
92 } | |
93 | |
94 return vis_type; | |
95 } | |
96 | |
97 static void ui_svis_class_init(UiSVisClass *klass) { | |
98 GtkObjectClass *object_class; | |
99 GtkWidgetClass *widget_class; | |
100 | |
101 object_class = (GtkObjectClass*) klass; | |
102 widget_class = (GtkWidgetClass*) klass; | |
103 parent_class = gtk_type_class (gtk_widget_get_type ()); | |
104 | |
105 object_class->destroy = ui_svis_destroy; | |
106 | |
107 widget_class->realize = ui_svis_realize; | |
108 widget_class->unrealize = ui_svis_unrealize; | |
109 widget_class->map = ui_svis_map; | |
110 widget_class->unmap = ui_svis_unmap; | |
111 widget_class->expose_event = ui_svis_expose; | |
112 widget_class->size_request = ui_svis_size_request; | |
113 widget_class->size_allocate = ui_svis_size_allocate; | |
114 | |
115 klass->doubled = ui_svis_toggle_doublesize; | |
116 | |
117 vis_signals[DOUBLED] = | |
118 g_signal_new ("toggle-double-size", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, | |
119 G_STRUCT_OFFSET (UiSVisClass, doubled), NULL, NULL, | |
120 gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); | |
121 } | |
122 | |
123 static void ui_svis_init(UiSVis *svis) { | |
124 | |
125 } | |
126 | |
127 GtkWidget* ui_svis_new(GtkWidget *fixed, gint x, gint y) { | |
128 UiSVis *svis = g_object_new (ui_svis_get_type (), NULL); | |
129 | |
130 svis->x = x; | |
131 svis->y = y; | |
132 | |
133 svis->width = SVIS_WIDTH; | |
134 svis->height = SVIS_HEIGHT; | |
135 | |
136 svis->fixed = fixed; | |
137 svis->double_size = FALSE; | |
138 | |
139 svis->visible_window = TRUE; | |
140 svis->event_window = NULL; | |
141 | |
142 gtk_fixed_put(GTK_FIXED(svis->fixed), GTK_WIDGET(svis), svis->x, svis->y); | |
143 | |
144 return GTK_WIDGET(svis); | |
145 } | |
146 | |
147 static void ui_svis_destroy(GtkObject *object) { | |
148 UiSVis *svis; | |
149 | |
150 g_return_if_fail (object != NULL); | |
151 g_return_if_fail (UI_IS_SVIS (object)); | |
152 | |
153 svis = UI_SVIS (object); | |
154 | |
155 if (GTK_OBJECT_CLASS (parent_class)->destroy) | |
156 (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); | |
157 } | |
158 | |
159 static void ui_svis_realize(GtkWidget *widget) { | |
160 UiSVis *svis; | |
161 GdkWindowAttr attributes; | |
162 gint attributes_mask; | |
163 | |
164 g_return_if_fail (widget != NULL); | |
165 g_return_if_fail (UI_IS_SVIS(widget)); | |
166 | |
167 GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); | |
168 svis = UI_SVIS(widget); | |
169 | |
170 attributes.x = widget->allocation.x; | |
171 attributes.y = widget->allocation.y; | |
172 attributes.width = widget->allocation.width; | |
173 attributes.height = widget->allocation.height; | |
174 attributes.window_type = GDK_WINDOW_CHILD; | |
175 attributes.event_mask = gtk_widget_get_events(widget); | |
176 attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK; | |
177 | |
178 if (svis->visible_window) | |
179 { | |
180 attributes.visual = gtk_widget_get_visual(widget); | |
181 attributes.colormap = gtk_widget_get_colormap(widget); | |
182 attributes.wclass = GDK_INPUT_OUTPUT; | |
183 attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; | |
184 widget->window = gdk_window_new(widget->parent->window, &attributes, attributes_mask); | |
185 GTK_WIDGET_UNSET_FLAGS(widget, GTK_NO_WINDOW); | |
186 gdk_window_set_user_data(widget->window, widget); | |
187 } | |
188 else | |
189 { | |
190 widget->window = gtk_widget_get_parent_window (widget); | |
191 g_object_ref (widget->window); | |
192 | |
193 attributes.wclass = GDK_INPUT_ONLY; | |
194 attributes_mask = GDK_WA_X | GDK_WA_Y; | |
195 svis->event_window = gdk_window_new (widget->window, &attributes, attributes_mask); | |
196 GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW); | |
197 gdk_window_set_user_data(svis->event_window, widget); | |
198 } | |
199 | |
200 widget->style = gtk_style_attach(widget->style, widget->window); | |
201 } | |
202 | |
203 static void ui_svis_unrealize(GtkWidget *widget) { | |
204 UiSVis *svis; | |
205 svis = UI_SVIS(widget); | |
206 | |
207 if ( svis->event_window != NULL ) | |
208 { | |
209 gdk_window_set_user_data( svis->event_window , NULL ); | |
210 gdk_window_destroy( svis->event_window ); | |
211 svis->event_window = NULL; | |
212 } | |
213 | |
214 if (GTK_WIDGET_CLASS (parent_class)->unrealize) | |
215 (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); | |
216 } | |
217 | |
218 static void ui_svis_map(GtkWidget *widget) | |
219 { | |
220 UiSVis *svis; | |
221 svis = UI_SVIS(widget); | |
222 | |
223 if (svis->event_window != NULL) | |
224 gdk_window_show (svis->event_window); | |
225 | |
226 if (GTK_WIDGET_CLASS (parent_class)->map) | |
227 (* GTK_WIDGET_CLASS (parent_class)->map) (widget); | |
228 } | |
229 | |
230 static void ui_svis_unmap (GtkWidget *widget) | |
231 { | |
232 UiSVis *svis; | |
233 svis = UI_SVIS(widget); | |
234 | |
235 if (svis->event_window != NULL) | |
236 gdk_window_hide (svis->event_window); | |
237 | |
238 if (GTK_WIDGET_CLASS (parent_class)->unmap) | |
239 (* GTK_WIDGET_CLASS (parent_class)->unmap) (widget); | |
240 } | |
241 | |
242 static void ui_svis_size_request(GtkWidget *widget, GtkRequisition *requisition) { | |
243 UiSVis *svis = UI_SVIS(widget); | |
244 | |
245 requisition->width = svis->width*(1+svis->double_size); | |
246 requisition->height = svis->height*(1+svis->double_size); | |
247 } | |
248 | |
249 static void ui_svis_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { | |
250 UiSVis *svis = UI_SVIS (widget); | |
251 | |
252 widget->allocation = *allocation; | |
253 widget->allocation.x *= (1+svis->double_size); | |
254 widget->allocation.y *= (1+svis->double_size); | |
255 if (GTK_WIDGET_REALIZED (widget)) | |
256 { | |
257 if (svis->event_window != NULL) | |
258 gdk_window_move_resize(svis->event_window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height); | |
259 else | |
260 gdk_window_move_resize(widget->window, widget->allocation.x, widget->allocation.y, allocation->width, allocation->height); | |
261 } | |
262 | |
263 svis->x = widget->allocation.x/(svis->double_size ? 2 : 1); | |
264 svis->y = widget->allocation.y/(svis->double_size ? 2 : 1); | |
265 } | |
266 | |
267 static gboolean ui_svis_expose(GtkWidget *widget, GdkEventExpose *event) { | |
268 g_return_val_if_fail (widget != NULL, FALSE); | |
269 g_return_val_if_fail (UI_IS_SVIS (widget), FALSE); | |
270 g_return_val_if_fail (event != NULL, FALSE); | |
271 | |
272 UiSVis *svis = UI_SVIS (widget); | |
273 | |
274 gint x, y, h; | |
275 guchar svis_color[24][3]; | |
276 guchar rgb_data[SVIS_WIDTH * 2 * SVIS_HEIGHT * 2], *ptr, c; | |
277 guint32 colors[24]; | |
278 GdkRgbCmap *cmap; | |
279 | |
280 if (!GTK_WIDGET_VISIBLE(widget)) | |
281 return FALSE; | |
282 | |
283 if (!svis->visible_window) | |
284 return FALSE; | |
285 | |
286 skin_get_viscolor(bmp_active_skin, svis_color); | |
287 for (y = 0; y < 24; y++) { | |
288 colors[y] = | |
289 svis_color[y][0] << 16 | svis_color[y][1] << 8 | svis_color[y][2]; | |
290 } | |
291 cmap = gdk_rgb_cmap_new(colors, 24); | |
292 | |
293 if (!cfg.doublesize) { | |
294 memset(rgb_data, 0, SVIS_WIDTH * SVIS_HEIGHT); | |
295 if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){ | |
296 for(y=0; y < SVIS_HEIGHT; y++){ | |
297 if (cfg.analyzer_type == ANALYZER_BARS){ | |
298 for(x=0;x< SVIS_WIDTH; x++){ | |
299 if(svis->data[x] > y << 1) | |
300 { | |
301 rgb_data[x*3+ (SVIS_HEIGHT - y) * SVIS_WIDTH] = 23; | |
302 rgb_data[x*3+1 + (SVIS_HEIGHT - y) * SVIS_WIDTH] = 23; | |
303 | |
304 } | |
305 } | |
306 } | |
307 else{ | |
308 for(x=0;x< SVIS_WIDTH; x++){ | |
309 if(svis->data[x] > y << 1) | |
310 { | |
311 rgb_data[x + (SVIS_HEIGHT - y) * SVIS_WIDTH] = 23; | |
312 } | |
313 } | |
314 } | |
315 } | |
316 } | |
317 else if (cfg.vis_type == VIS_VOICEPRINT){ | |
318 switch (cfg.vu_mode) { | |
319 case VU_NORMAL: | |
320 for (y = 0; y < 2; y++) { | |
321 ptr = rgb_data + ((y * 3) * 38); | |
322 h = (svis->data[y] * 7) / 37; | |
323 for (x = 0; x < h; x++, ptr += 5) { | |
324 c = svis_vu_normal_colors[x]; | |
325 *(ptr) = c; | |
326 *(ptr + 1) = c; | |
327 *(ptr + 2) = c; | |
328 *(ptr + 38) = c; | |
329 *(ptr + 39) = c; | |
330 *(ptr + 40) = c; | |
331 } | |
332 } | |
333 break; | |
334 case VU_SMOOTH: | |
335 for (y = 0; y < 2; y++) { | |
336 ptr = rgb_data + ((y * 3) * SVIS_WIDTH); | |
337 for (x = 0; x < svis->data[y]; x++, ptr++) { | |
338 c = 17 - ((x * 15) / 37); | |
339 *(ptr) = c; | |
340 *(ptr + 38) = c; | |
341 } | |
342 } | |
343 break; | |
344 } | |
345 } | |
346 else if (cfg.vis_type == VIS_SCOPE) { | |
347 for (x = 0; x < 38; x++) { | |
348 h = svis->data[x << 1] / 3; | |
349 ptr = rgb_data + ((4 - h) * 38) + x; | |
350 *ptr = svis_scope_colors[h]; | |
351 } | |
352 } | |
353 | |
354 } | |
355 else { /* doublesize */ | |
356 | |
357 memset(rgb_data, 0, SVIS_WIDTH * 2 * SVIS_HEIGHT * 2); | |
358 if (cfg.vis_type == VIS_ANALYZER && !playback_get_paused() && playback_get_playing()){ | |
359 for(y=0; y < SVIS_HEIGHT; y++){ | |
360 if (cfg.analyzer_type == ANALYZER_BARS){ | |
361 for(x=0;x< SVIS_WIDTH; x++){ | |
362 if(svis->data[x] > y << 1) | |
363 { | |
364 ptr = rgb_data + x * 6 + (SVIS_HEIGHT * 2 - y * 2) * SVIS_WIDTH * 2; | |
365 DRAW_DS_PIXEL(ptr, 23); | |
366 DRAW_DS_PIXEL(ptr + 2, 23); | |
367 } | |
368 } | |
369 } | |
370 else{ | |
371 for(x=0;x< SVIS_WIDTH; x++){ | |
372 if(svis->data[x] > y << 1) | |
373 { | |
374 ptr = rgb_data + x * 2 + (SVIS_HEIGHT * 2 - y * 2) * SVIS_WIDTH * 2; | |
375 DRAW_DS_PIXEL(ptr, 23); | |
376 } | |
377 } | |
378 } | |
379 } | |
380 } | |
381 else if (cfg.vis_type == VIS_VOICEPRINT){ | |
382 switch (cfg.vu_mode) { | |
383 case VU_NORMAL: | |
384 for (y = 0; y < 2; y++) { | |
385 ptr = rgb_data + ((y * 3) * 152); | |
386 h = (svis->data[y] * 8) / 37; | |
387 for (x = 0; x < h; x++, ptr += 10) { | |
388 c = svis_vu_normal_colors[x]; | |
389 DRAW_DS_PIXEL(ptr, c); | |
390 DRAW_DS_PIXEL(ptr + 2, c); | |
391 DRAW_DS_PIXEL(ptr + 4, c); | |
392 DRAW_DS_PIXEL(ptr + 152, c); | |
393 DRAW_DS_PIXEL(ptr + 154, c); | |
394 DRAW_DS_PIXEL(ptr + 156, c); | |
395 } | |
396 } | |
397 break; | |
398 case VU_SMOOTH: | |
399 for (y = 0; y < 2; y++) { | |
400 ptr = rgb_data + ((y * 3) * 152); | |
401 for (x = 0; x < svis->data[y]; x++, ptr += 2) { | |
402 c = 17 - ((x * 15) / 37); | |
403 DRAW_DS_PIXEL(ptr, c); | |
404 DRAW_DS_PIXEL(ptr + 152, c); | |
405 } | |
406 } | |
407 break; | |
408 } | |
409 } | |
410 else if (cfg.vis_type == VIS_SCOPE) { | |
411 for (x = 0; x < 38; x++) { | |
412 h = svis->data[x << 1] / 3; | |
413 ptr = rgb_data + ((4 - h) * 152) + (x << 1); | |
414 *ptr = svis_scope_colors[h]; | |
415 *(ptr + 1) = svis_scope_colors[h]; | |
416 *(ptr + 76) = svis_scope_colors[h]; | |
417 *(ptr + 77) = svis_scope_colors[h]; | |
418 } | |
419 } | |
420 | |
421 | |
422 } | |
423 | |
424 GdkPixmap *obj = NULL; | |
425 GdkGC *gc; | |
426 obj = gdk_pixmap_new(NULL, svis->width*(1+svis->double_size), svis->height*(1+svis->double_size), gdk_rgb_get_visual()->depth); | |
427 gc = gdk_gc_new(obj); | |
428 | |
429 if (!svis->double_size) { | |
430 gdk_draw_indexed_image(obj, gc, 0, 0, svis->width, svis->height, | |
431 GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data, | |
432 38, cmap); | |
433 } else { | |
434 gdk_draw_indexed_image(obj, gc, | |
435 0 << 1, 0 << 1, | |
436 svis->width << 1, svis->height << 1, | |
437 GDK_RGB_DITHER_NONE, (guchar *) rgb_data, | |
438 76, cmap); | |
439 } | |
440 | |
441 gdk_rgb_cmap_free(cmap); | |
442 gdk_draw_drawable (widget->window, gc, obj, 0, 0, 0, 0, | |
443 svis->width*(1+svis->double_size), svis->height*(1+svis->double_size)); | |
444 g_object_unref(obj); | |
445 g_object_unref(gc); | |
446 | |
447 return FALSE; | |
448 } | |
449 | |
450 static void ui_svis_toggle_doublesize(UiSVis *svis) { | |
451 GtkWidget *widget = GTK_WIDGET (svis); | |
452 svis->double_size = !svis->double_size; | |
453 | |
454 gtk_widget_set_size_request(widget, svis->width*(1+svis->double_size), svis->height*(1+svis->double_size)); | |
455 | |
456 gtk_widget_queue_draw(widget); | |
457 } | |
458 | |
459 void ui_svis_set_visible(GtkWidget *widget, gboolean window_is_visible) | |
460 { | |
461 UiSVis *svis; | |
462 gboolean widget_is_visible; | |
463 | |
464 g_return_if_fail(UI_IS_SVIS(widget)); | |
465 | |
466 svis = UI_SVIS (widget); | |
467 widget_is_visible = GTK_WIDGET_VISIBLE(widget); | |
468 | |
469 svis->visible_window = window_is_visible; | |
470 | |
471 if (GTK_WIDGET_REALIZED (widget)) | |
472 { | |
473 if ( widget_is_visible ) | |
474 gtk_widget_hide(widget); | |
475 | |
476 gtk_widget_unrealize(widget); | |
477 gtk_widget_realize(widget); | |
478 | |
479 if ( widget_is_visible ) | |
480 gtk_widget_show(widget); | |
481 } | |
482 | |
483 if (widget_is_visible) | |
484 gtk_widget_queue_resize(widget); | |
485 } | |
486 | |
487 void ui_svis_clear_data(GtkWidget *widget) { | |
488 gint i; | |
489 | |
490 UiSVis *svis = UI_SVIS (widget); | |
491 | |
492 for (i = 0; i < 75; i++) { | |
493 svis->data[i] = (cfg.vis_type == VIS_SCOPE) ? 6 : 0; | |
494 } | |
495 } | |
496 | |
497 void ui_svis_timeout_func(GtkWidget *widget, guchar * data) { | |
498 UiSVis *svis = UI_SVIS (widget); | |
499 static GTimer *timer = NULL; | |
500 gulong micros = 9999999; | |
501 gboolean falloff = FALSE; | |
502 gint i; | |
503 | |
504 if (!timer) { | |
505 timer = g_timer_new(); | |
506 g_timer_start(timer); | |
507 } | |
508 else { | |
509 g_timer_elapsed(timer, µs); | |
510 if (micros > 14000) | |
511 g_timer_reset(timer); | |
512 | |
513 } | |
514 | |
515 if (cfg.vis_type == VIS_VOICEPRINT) { | |
516 if (micros > 14000) | |
517 falloff = TRUE; | |
518 | |
519 for (i = 0; i < 2; i++) { | |
520 if (falloff || data) { | |
521 if (data && data[i] > svis->data[i]) | |
522 svis->data[i] = data[i]; | |
523 else if (falloff) { | |
524 if (svis->data[i] >= 2) | |
525 svis->data[i] -= 2; | |
526 else | |
527 svis->data[i] = 0; | |
528 } | |
529 } | |
530 | |
531 } | |
532 } | |
533 else if (data) { | |
534 for (i = 0; i < 75; i++) | |
535 svis->data[i] = data[i]; | |
536 } | |
537 | |
538 if (micros > 14000) { | |
539 if (!svis->refresh_delay) { | |
540 gtk_widget_queue_draw(widget); | |
541 svis->refresh_delay = svis_redraw_delays[cfg.vis_refresh]; | |
542 } | |
543 svis->refresh_delay--; | |
544 } | |
545 } |