Browse Source

Don't use invalid info in the Timebase callback if no tempo map exists.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
0e34509e51
3 changed files with 8 additions and 2 deletions
  1. +1
    -0
      Timeline/Engine/Engine.C
  2. +2
    -2
      Timeline/TLE.fl
  3. +5
    -0
      Timeline/Timeline.C

+ 1
- 0
Timeline/Engine/Engine.C View File

@@ -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;


+ 2
- 2
Timeline/TLE.fl View File

@@ -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}


+ 5
- 0
Timeline/Timeline.C View File

@@ -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…
Cancel
Save