Add time signature and tempo info to BBT clock.

This commit is contained in:
Jonathan Moore Liles 2008-05-14 15:27:37 -05:00
parent 577f0bd1d0
commit bde6f2c557
1 changed files with 7 additions and 0 deletions

View File

@ -197,6 +197,13 @@ public:
snprintf( buf, sizeof( buf ), "%lu", (unsigned long)timeline->sample_rate() ); snprintf( buf, sizeof( buf ), "%lu", (unsigned long)timeline->sample_rate() );
fl_draw( buf, dx, dy, dw, dh, FL_ALIGN_BOTTOM ); fl_draw( buf, dx, dy, dw, dh, FL_ALIGN_BOTTOM );
break; break;
case BBT:
{
/* FIXME: find a way to avoid doing this twice */
position_info pos = timeline->solve_tempomap( _when );
snprintf( buf, sizeof( buf ), "%d/%d %5.1f", pos.beats_per_bar, pos.beat_type, pos.tempo );
fl_draw( buf, dx, dy, dw, dh, FL_ALIGN_BOTTOM );
}
default: default:
break; break;
} }