static void render_freq (const gfloat * freq)
{
    guchar data[512];

    if (config.vis_type == VIS_ANALYZER)
    {
        if (config.analyzer_type == ANALYZER_BARS)
        {
            if (config.player_shaded)
                make_log_graph (freq, 13, 40, 8, data);
            else
                make_log_graph (freq, 19, 40, 16, data);
        }
        else
        {
            if (config.player_shaded)
                make_log_graph (freq, 37, 40, 8, data);
            else
                make_log_graph (freq, 75, 40, 16, data);
        }
    }
    else if (config.vis_type == VIS_VOICEPRINT && ! config.player_shaded)
        make_log_graph (freq, 17, 40, 255, data);
    else
        return;

    if (config.player_shaded)
        ui_svis_timeout_func (mainwin_svis, data);
    else
        ui_vis_timeout_func (mainwin_vis, data);
}
Beispiel #2
0
static void render_freq (const float * freq)
{
    make_log_graph (freq, s_bars[s_pos]);
    s_pos = (s_pos + 1) % NUM_BANDS;

    s_angle += s_anglespeed;
    if (s_angle > 45 || s_angle < -45)
        s_anglespeed = -s_anglespeed;

    if (s_widget)
        gtk_widget_queue_draw (s_widget);
}