static void bscope_render (const gfloat * data) { bscope_blur (); gint prev_y = (0.5 + data[0]) * height; prev_y = CLAMP (prev_y, 0, height - 1); for (gint i = 0; i < width; i ++) { gint y = (0.5 + data[i * 512 / width]) * height; y = CLAMP (y, 0, height - 1); draw_vert_line (i, prev_y, y); prev_y = y; } bscope_draw (); }
static void bscope_clear (void) { g_return_if_fail (image != NULL); memset (image, 0, image_size); bscope_draw (); }
static gboolean expose_event (GtkWidget * widget) { bscope_draw (); return TRUE; }