示例#1
0
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 ();
}
示例#2
0
static void bscope_clear (void)
{
    g_return_if_fail (image != NULL);
    memset (image, 0, image_size);
    bscope_draw ();
}
示例#3
0
static gboolean expose_event (GtkWidget * widget)
{
    bscope_draw ();
    return TRUE;
}