From c53cf523b108845d074ea68d7fac592ec85e5a60 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 21 Aug 2013 09:54:10 +0100 Subject: working audio viz --- rotord/src/nodes_drawing.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rotord/src/nodes_drawing.h') diff --git a/rotord/src/nodes_drawing.h b/rotord/src/nodes_drawing.h index 375ab03..ad5bc8c 100644 --- a/rotord/src/nodes_drawing.h +++ b/rotord/src/nodes_drawing.h @@ -166,11 +166,12 @@ namespace Rotor { if (attributes["mode"]->value=="fill"||attributes["mode"]->value=="both") { cairo_set_source_rgb(cr, fill.Rfloat(),fill.Gfloat(),fill.Bfloat()); cairo_save(cr); //not really even necessary? - cairo_translate(cr, 0, frame.h/2); + cairo_translate(cr, 0, 0); + //cairo_line_to(cr, 0, frame.h/2); for (int i=0;isamples[i*frame.audio->channels])*frame.h)>>16); } - cairo_line_to(cr, frame.w, frame.h/2); + cairo_line_to(cr, frame.w, 0); cairo_close_path(cr); cairo_restore (cr); //not really even necessary? cairo_fill(cr); @@ -178,10 +179,11 @@ namespace Rotor { if (attributes["mode"]->value=="line"||attributes["mode"]->value=="both") { cairo_set_source_rgb(cr, stroke.Rfloat(),stroke.Gfloat(),stroke.Bfloat()); cairo_save(cr); //not really even necessary? - cairo_translate(cr, 0, frame.h/2); + cairo_translate(cr, 0, 0); for (int i=0;isamples[i*frame.audio->channels])*frame.h)>>16); } + cairo_line_to(cr, frame.w, 0); cairo_restore (cr); //not really even necessary? cairo_stroke(cr); } -- cgit v1.2.3