Browse Source

Try to be more accurate in drawing measure lines.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
30b4c1bb4b
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      Timeline/Timeline.C

+ 6
- 4
Timeline/Timeline.C View File

@@ -406,12 +406,14 @@ Timeline::draw_measure ( nframes_t when, int Y, int W, int H, Fl_Color color, me

tp = (Tempo_Point*)(*tpi);

const nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );
nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );

beat_inc = samples_per_minute / tp->tempo();

const int incx = ts_to_x( beat_inc );

/* lock to beat lines */
ntpo += (ntpo % beat_inc);

if ( incx < 8 )
continue;

@@ -1247,8 +1249,8 @@ Timeline::total_capture_xruns ( void )
Track *t = (Track*)tracks->child( i );

if ( t->record_ds )
r += t->record_ds->xruns();
}
r += t->record_ds->xruns();
}

return r;
}

Loading…
Cancel
Save