summaryrefslogtreecommitdiff
path: root/libs/ardour/test
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-11-09 01:30:32 +1100
committernick_m <mainsbridge@gmail.com>2016-11-11 03:37:08 +1100
commite8042f584367550843306cc1c11c25d796219a37 (patch)
treee29b3876cccb80fcd1bcf2f9c845d3f9f7331325 /libs/ardour/test
parent5aafb0b53486a92a4e966510388d9c7cfbb799fb (diff)
use note_type explicitly when constructing a Tempo in the hope that others follow.
- should be a no-op
Diffstat (limited to 'libs/ardour/test')
-rw-r--r--libs/ardour/test/bbt_test.cc2
-rw-r--r--libs/ardour/test/framepos_plus_beats_test.cc12
-rw-r--r--libs/ardour/test/framewalk_to_beats_test.cc10
-rw-r--r--libs/ardour/test/midi_clock_slave_test.h2
-rw-r--r--libs/ardour/test/tempo_test.cc36
5 files changed, 31 insertions, 31 deletions
diff --git a/libs/ardour/test/bbt_test.cc b/libs/ardour/test/bbt_test.cc
index 8dfcabb942..ec5aea91ca 100644
--- a/libs/ardour/test/bbt_test.cc
+++ b/libs/ardour/test/bbt_test.cc
@@ -13,7 +13,7 @@ void
BBTTest::addTest ()
{
TempoMap map(48000);
- Tempo tempo(120);
+ Tempo tempo(120, 4.0);
Meter meter(4.0, 4.0);
/* no need to supply the frame for a new music-locked meter */
diff --git a/libs/ardour/test/framepos_plus_beats_test.cc b/libs/ardour/test/framepos_plus_beats_test.cc
index cdda6ead1f..ab81777840 100644
--- a/libs/ardour/test/framepos_plus_beats_test.cc
+++ b/libs/ardour/test/framepos_plus_beats_test.cc
@@ -18,7 +18,7 @@ FrameposPlusBeatsTest::singleTempoTest ()
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
TempoMap map (sampling_rate);
- Tempo tempo (bpm);
+ Tempo tempo (bpm, 4.0);
Meter meter (4, 4);
map.replace_meter (map.first_meter(), meter, BBT_Time (1, 1, 0), AudioTime);
@@ -62,9 +62,9 @@ FrameposPlusBeatsTest::doubleTempoTest ()
*/
- Tempo tempoA (120);
+ Tempo tempoA (120, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
- Tempo tempoB (240);
+ Tempo tempoB (240, 4.0);
map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime);
/* Now some tests */
@@ -115,9 +115,9 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
*/
- Tempo tempoA (120);
+ Tempo tempoA (120, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
- Tempo tempoB (240);
+ Tempo tempoB (240, 4.0);
map.add_tempo (tempoB, 12.0 / tempoA.note_type(), 0, TempoSection::Constant, MusicTime);
Meter meterB (3, 8);
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), MusicTime);
@@ -172,7 +172,7 @@ FrameposPlusBeatsTest::doubleTempoWithComplexMeterTest ()
4|1|0
*/
- Tempo tempoA (120);
+ Tempo tempoA (120, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
Tempo tempoB (240, 4.0);
map.add_tempo (tempoB, 12.0 / 4.0, 0, TempoSection::Constant, MusicTime);
diff --git a/libs/ardour/test/framewalk_to_beats_test.cc b/libs/ardour/test/framewalk_to_beats_test.cc
index 11827484a2..1ed044acf4 100644
--- a/libs/ardour/test/framewalk_to_beats_test.cc
+++ b/libs/ardour/test/framewalk_to_beats_test.cc
@@ -17,7 +17,7 @@ FramewalkToBeatsTest::singleTempoTest ()
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
TempoMap map (sampling_rate);
- Tempo tempo (bpm);
+ Tempo tempo (bpm, 4.0);
Meter meter (4, 4);
map.replace_meter (map.meter_section_at_frame (0), meter, BBT_Time (1, 1, 0), AudioTime);
@@ -126,11 +126,11 @@ FramewalkToBeatsTest::tripleTempoTest ()
*/
- Tempo tempoA (120);
+ Tempo tempoA (120, 4.0);
map.replace_tempo (map.tempo_section_at_frame (0), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
- Tempo tempoB (240);
+ Tempo tempoB (240, 4.0);
map.add_tempo (tempoB, 4.0 / tempoB.note_type(), 0, TempoSection::Constant, MusicTime);
- Tempo tempoC (160);
+ Tempo tempoC (160, 4.0);
map.add_tempo (tempoC, 8.0 / tempoB.note_type(), 0, TempoSection::Constant, MusicTime);
/* Walk from 1|3 to 4|1 */
@@ -147,7 +147,7 @@ FramewalkToBeatsTest::singleTempoMeterTest ()
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
TempoMap map (sampling_rate);
- Tempo tempo (bpm);
+ Tempo tempo (bpm, 4.0);
Meter meter (7, 8);
map.replace_meter (map.meter_section_at_frame (0), meter, BBT_Time (1, 1, 0), AudioTime);
diff --git a/libs/ardour/test/midi_clock_slave_test.h b/libs/ardour/test/midi_clock_slave_test.h
index 6866186d5a..48365e39df 100644
--- a/libs/ardour/test/midi_clock_slave_test.h
+++ b/libs/ardour/test/midi_clock_slave_test.h
@@ -44,7 +44,7 @@ class TestSlaveSessionProxy : public ISlaveSessionProxy {
_transport_frame (0),
_frame_time (1000000),
_tempo_map (0),
- tempo (120),
+ tempo (120, 4.0),
meter (4.0, 4.0)
{
_tempo_map = new TempoMap (FRAME_RATE);
diff --git a/libs/ardour/test/tempo_test.cc b/libs/ardour/test/tempo_test.cc
index 6d84e67db1..d8775a7287 100644
--- a/libs/ardour/test/tempo_test.cc
+++ b/libs/ardour/test/tempo_test.cc
@@ -35,9 +35,9 @@ TempoTest::recomputeMapTest48 ()
*/
- Tempo tempoA (120);
+ Tempo tempoA (120.0, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
- Tempo tempoB (240);
+ Tempo tempoB (240.0, 4.0);
map.add_tempo (tempoB, 3.0, 0, TempoSection::Constant, MusicTime);
Meter meterB (3, 4);
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), MusicTime);
@@ -133,9 +133,9 @@ TempoTest::recomputeMapTest44 ()
*/
- Tempo tempoA (120);
+ Tempo tempoA (120.0, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
- Tempo tempoB (240);
+ Tempo tempoB (240.0, 4.0);
map.add_tempo (tempoB, 3.0, 0, TempoSection::Constant, MusicTime);
Meter meterB (3, 4);
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0), MusicTime);
@@ -233,21 +233,21 @@ TempoTest::qnDistanceTestConstant ()
*/
- Tempo tempoA (120.0);
+ Tempo tempoA (120.0, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Constant, AudioTime);
/* should have no effect on pulse */
- Tempo tempoB (120.0);
+ Tempo tempoB (120.0, 4.0);
map.add_tempo (tempoB, 2.0, 0, TempoSection::Constant, MusicTime);
/* equivalent to pulse 3.0 @ 120 bpm*/
- Tempo tempoC (240.0);
+ Tempo tempoC (240.0, 4.0);
map.add_tempo (tempoC, 0.0, 6 * sampling_rate, TempoSection::Constant, AudioTime);
- Tempo tempoD (90.4);
+ Tempo tempoD (90.4, 4.0);
map.add_tempo (tempoD, 9.0, 0, TempoSection::Constant, MusicTime);
- Tempo tempoE (110.6);
+ Tempo tempoE (110.6, 4.0);
map.add_tempo (tempoE, 12.0, 0, TempoSection::Constant, MusicTime);
- Tempo tempoF (123.7);
+ Tempo tempoF (123.7, 4.0);
map.add_tempo (tempoF, 15.0, 0, TempoSection::Constant, MusicTime);
- Tempo tempoG (111.8);
+ Tempo tempoG (111.8, 4.0);
map.add_tempo (tempoG, 0.0, (framepos_t) 2 * 60 * sampling_rate, TempoSection::Constant, AudioTime);
Meter meterB (3, 4);
@@ -313,20 +313,20 @@ TempoTest::qnDistanceTestRamp ()
*/
- Tempo tempoA (120.2);
+ Tempo tempoA (120.2, 4.0);
map.replace_tempo (map.first_tempo(), tempoA, 0.0, 0, TempoSection::Ramp, AudioTime);
- Tempo tempoB (240.5);
+ Tempo tempoB (240.5, 4.0);
map.add_tempo (tempoB, 3.0, 0, TempoSection::Ramp, MusicTime);
- Tempo tempoC (130.1);
+ Tempo tempoC (130.1, 4.0);
map.add_tempo (tempoC, 0.0, 6 * sampling_rate, TempoSection::Ramp, AudioTime);
- Tempo tempoD (90.3);
+ Tempo tempoD (90.3, 4.0);
map.add_tempo (tempoD, 9.0, 0, TempoSection::Ramp, MusicTime);
- Tempo tempoE (110.7);
+ Tempo tempoE (110.7, 4.0);
map.add_tempo (tempoE, 12.0, 0, TempoSection::Ramp, MusicTime);
- Tempo tempoF (123.9);
+ Tempo tempoF (123.9, 4.0);
map.add_tempo (tempoF, 15.0, 0, TempoSection::Ramp, MusicTime);
- Tempo tempoG (111.8);
+ Tempo tempoG (111.8, 4.0);
map.add_tempo (tempoG, 0.0, (framepos_t) 2 * 60 * sampling_rate, TempoSection::Ramp, AudioTime);
Meter meterB (3, 4);
map.add_meter (meterB, 4.0, BBT_Time (2, 1, 0), AudioTime);