diff options
author | nick_m <mainsbridge@gmail.com> | 2016-08-10 01:46:05 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-08-10 01:46:05 +1000 |
commit | 9acfdb31a29e218efcb9126e03b97c1c5edf8af4 (patch) | |
tree | c632e3f66eb73a7a8360ab50096f49cd16bc5ff7 /libs/ardour/test/framepos_plus_beats_test.cc | |
parent | 4ddb6b74f5c0fe445b49e9abb5527afecc60dd8b (diff) |
Make tempo tests use the api more correctly.
- TempoMap initially contains a tempo and meter.
using add_tempo/meter() using the position of an
existing section does the right thing, but prints a warning.
Use replace_tempo/meter().
Diffstat (limited to 'libs/ardour/test/framepos_plus_beats_test.cc')
-rw-r--r-- | libs/ardour/test/framepos_plus_beats_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/test/framepos_plus_beats_test.cc b/libs/ardour/test/framepos_plus_beats_test.cc index a1a72d5dcb..8193eafb61 100644 --- a/libs/ardour/test/framepos_plus_beats_test.cc +++ b/libs/ardour/test/framepos_plus_beats_test.cc @@ -21,8 +21,8 @@ FrameposPlusBeatsTest::singleTempoTest () Tempo tempo (bpm); Meter meter (4, 4); - map.add_meter (meter, 0.0, BBT_Time (1, 1, 0), 0, AudioTime); - map.add_tempo (tempo, 0.0, 0, TempoSection::Constant, AudioTime); + map.replace_meter (map.first_meter(), meter, BBT_Time (1, 1, 0), (framepos_t) 0, AudioTime); + map.replace_tempo (map.first_tempo(), tempo, 0.0, 0, TempoSection::Constant, AudioTime); /* Add 1 beat to beat 3 of the first bar */ framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, Evoral::Beats(1)); @@ -41,7 +41,7 @@ FrameposPlusBeatsTest::doubleTempoTest () TempoMap map (sampling_rate); Meter meter (4, 4); - map.add_meter (meter, 0.0, BBT_Time (1, 1, 0), 0, AudioTime); + map.replace_meter (map.first_meter(), meter, BBT_Time (1, 1, 0), (framepos_t) 0, AudioTime); /* 120bpm at bar 1, 240bpm at bar 4 @@ -63,7 +63,7 @@ FrameposPlusBeatsTest::doubleTempoTest () */ Tempo tempoA (120); - map.add_tempo (tempoA, 0.0, 0, TempoSection::Constant, AudioTime); + map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime); Tempo tempoB (240); map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime); @@ -94,7 +94,7 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest () TempoMap map (sampling_rate); Meter meterA (4, 4); - map.add_meter (meterA, 0.0, BBT_Time (1, 1, 0), 0, AudioTime); + map.replace_meter (map.first_meter(), meterA, BBT_Time (1, 1, 0), (framepos_t) 0, AudioTime); /* 120bpm at bar 1, 240bpm at bar 4 @@ -116,7 +116,7 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest () */ Tempo tempoA (120); - map.add_tempo (tempoA, 0.0, 0, TempoSection::Constant, AudioTime); + map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime); Tempo tempoB (240); map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime); Meter meterB (3, 4); |