Don't use invalid info in the Timebase callback if no tempo map exists.
This commit is contained in:
parent
c55b01dc68
commit
0e34509e51
|
@ -174,6 +174,7 @@ Engine::timebase ( jack_transport_state_t, jack_nframes_t, jack_position_t *pos,
|
|||
position_info pi = timeline->solve_tempomap( pos->frame );
|
||||
|
||||
pos->valid = JackPositionBBT;
|
||||
|
||||
pos->beats_per_bar = pi.beats_per_bar;
|
||||
pos->beat_type = pi.beat_type;
|
||||
pos->beats_per_minute = pi.tempo;
|
||||
|
|
|
@ -161,7 +161,7 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
|
|||
} {
|
||||
Fl_Window main_window {
|
||||
label Timeline
|
||||
xywh {254 189 1025 770} type Double resizable xclass Non_DAW visible
|
||||
xywh {174 117 1025 770} type Double resizable xclass Non_DAW visible
|
||||
} {
|
||||
Fl_Menu_Bar menubar {
|
||||
xywh {0 0 1024 25}
|
||||
|
@ -933,7 +933,7 @@ while ( _window->shown() )
|
|||
} {
|
||||
Fl_Window _window {
|
||||
label {Project info} open selected
|
||||
xywh {394 254 520 625} type Double visible
|
||||
xywh {215 260 520 625} type Double visible
|
||||
} {
|
||||
Fl_Value_Output {} {
|
||||
label {Sample Rate}
|
||||
|
|
|
@ -686,6 +686,11 @@ Timeline::render_tempomap( nframes_t start, nframes_t length, measure_line_callb
|
|||
|
||||
BBT &bbt = pos.bbt;
|
||||
|
||||
/* default values */
|
||||
pos.beat_type = 4;
|
||||
pos.beats_per_bar = 4;
|
||||
pos.tempo = 120.0;
|
||||
|
||||
const nframes_t samples_per_minute = sample_rate() * 60;
|
||||
|
||||
float bpm = 120.0f;
|
||||
|
|
Loading…
Reference in New Issue