From 275878395fe7b8c70f12cd1f4621b35818fe0ae5 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 5 Jun 2012 17:31:23 -0700 Subject: [PATCH] Revert "Indicate loop point by modifying waveform color." --- timeline/src/Audio_Region.C | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/timeline/src/Audio_Region.C b/timeline/src/Audio_Region.C index d66e1e7..8da4383 100644 --- a/timeline/src/Audio_Region.C +++ b/timeline/src/Audio_Region.C @@ -565,8 +565,6 @@ Audio_Region::draw ( void ) int peaks; Peak *pbuf = NULL; -// Fl_Color c = _color; - do { nframes_t start = _r->offset; @@ -642,6 +640,9 @@ Audio_Region::draw ( void ) // DMESSAGE( "using cached peaks" ); } + Fl_Color c = _color; + + // c = fl_color_average( FL_BLACK, FL_RED, 0.20 ); if ( peaks && pbuf ) @@ -667,12 +668,24 @@ Audio_Region::draw ( void ) xo += loop_peaks_needed; - c = fl_color_average( FL_GRAY, _color, 0.70 ); } while ( _loop && xo < W ); timeline->draw_measure_lines( X, Y, W, H ); + if ( _loop && offset < _loop ) + { + const int lx = timeline->ts_to_x( _loop - offset ); + + if ( lx < X + W ) + { + fl_color( FL_RED ); + fl_line_style( FL_DASH, 0 ); + fl_line( X + lx + 2, y(), X + lx + 2, y() + h() ); + fl_line_style( FL_SOLID, 0 ); + } + } + if ( _adjusting_gain ) { fl_color( fl_color_add_alpha( FL_DARK1, 127 ) );