summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-06-17 17:36:47 +1000
committerDamien Zammit <damien@zamaudio.com>2019-06-17 17:36:47 +1000
commitfe6f8f271fcf882c7e1723c73aea0130e9ba731f (patch)
tree3070b01a7b1b6f80f7da0df370a69384c1d5611a
parent4b3e603e529c2e0e19b50125eec01ef47b7fb477 (diff)
Fix most breaking tests
-rw-r--r--ptfformat.cc21
-rwxr-xr-xtests/t.5/basicaudio132
-rwxr-xr-xtests/t.5/basicaudio256
-rwxr-xr-xtests/t.5/basicaudio316
-rwxr-xr-xtests/t.8/basicaudio14
-rwxr-xr-xtests/t.8/basicmidi12
6 files changed, 78 insertions, 73 deletions
diff --git a/ptfformat.cc b/ptfformat.cc
index 5b71011..800c123 100644
--- a/ptfformat.cc
+++ b/ptfformat.cc
@@ -714,11 +714,22 @@ PTFFormat::parseaudio(void) {
if (foundin(wavname, std::string("Fade Files"))) {
continue;
}
- if ((wavtype.size() != 0) && !(foundin(wavtype, std::string("WAVE")) ||
- foundin(wavtype, std::string("EVAW")) ||
- foundin(wavtype, std::string("AIFF")) ||
- foundin(wavtype, std::string("FFIA"))) ) {
- continue;
+ if (version < 10) {
+ if (!(foundin(wavtype, std::string("WAVE")) ||
+ foundin(wavtype, std::string("EVAW")) ||
+ foundin(wavtype, std::string("AIFF")) ||
+ foundin(wavtype, std::string("FFIA"))) ) {
+ continue;
+ }
+ } else {
+ if (wavtype.size() != 0) {
+ if (!(foundin(wavtype, std::string("WAVE")) ||
+ foundin(wavtype, std::string("EVAW")) ||
+ foundin(wavtype, std::string("AIFF")) ||
+ foundin(wavtype, std::string("FFIA"))) ) {
+ continue;
+ }
+ }
}
wav_t f = { wavname, (uint16_t)n, 0, 0 };
n++;
diff --git a/tests/t.5/basicaudio1 b/tests/t.5/basicaudio1
index a1c538c..9b0e6c0 100755
--- a/tests/t.5/basicaudio1
+++ b/tests/t.5/basicaudio1
@@ -32,25 +32,25 @@ Region (Region#) (WAV#) @ into-sample, length:
MIDI Region (Region#) @ into-sample, length:
Track name (Track#) (Region#) @ Absolute:
-`DR_L` t(1) r(4) @ 0
-`DR_R` t(2) r(5) @ 0
-`Rhodes_L` t(3) r(6) @ 0
-`Rhodes_R` t(4) r(7) @ 0
-`Bass_L` t(5) r(0) @ 0
-`Bass_R` t(6) r(1) @ 0
-`cymb_L` t(7) r(2) @ 0
-`cymb_R` t(8) r(3) @ 0
+`DR_L` t(0) r(4) @ 0
+`DR_R` t(1) r(5) @ 0
+`Rhodes_L` t(2) r(6) @ 0
+`Rhodes_R` t(3) r(7) @ 0
+`Bass_L` t(4) r(0) @ 0
+`Bass_R` t(5) r(1) @ 0
+`cymb_L` t(6) r(2) @ 0
+`cymb_R` t(7) r(3) @ 0
MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
-`DR_L` t(1) (DR_L.aif) @ 0 + 0, 1377004
-`DR_R` t(2) (DR_R.aif) @ 0 + 0, 1377004
-`Rhodes_L` t(3) (Rhodes_L_01.aif) @ 0 + 0, 1377004
-`Rhodes_R` t(4) (Rhodes_R_01.aif) @ 0 + 0, 1377004
-`Bass_L` t(5) (Bass_L_01.aif) @ 0 + 0, 1377004
-`Bass_R` t(6) (Bass_R_01.aif) @ 0 + 0, 1377004
-`cymb_L` t(7) (cymb_L_01.aif) @ 0 + 0, 1355463
-`cymb_R` t(8) (cymb_R_01.aif) @ 0 + 0, 1355463'
+`DR_L` t(0) (DR_L.aif) @ 0 + 0, 1377004
+`DR_R` t(1) (DR_R.aif) @ 0 + 0, 1377004
+`Rhodes_L` t(2) (Rhodes_L_01.aif) @ 0 + 0, 1377004
+`Rhodes_R` t(3) (Rhodes_R_01.aif) @ 0 + 0, 1377004
+`Bass_L` t(4) (Bass_L_01.aif) @ 0 + 0, 1377004
+`Bass_R` t(5) (Bass_R_01.aif) @ 0 + 0, 1377004
+`cymb_L` t(6) (cymb_L_01.aif) @ 0 + 0, 1355463
+`cymb_R` t(7) (cymb_R_01.aif) @ 0 + 0, 1355463'
run_test
diff --git a/tests/t.5/basicaudio2 b/tests/t.5/basicaudio2
index 122f299..cac5a0b 100755
--- a/tests/t.5/basicaudio2
+++ b/tests/t.5/basicaudio2
@@ -18,37 +18,37 @@ Region (Region#) (WAV#) @ into-sample, length:
MIDI Region (Region#) @ into-sample, length:
Track name (Track#) (Region#) @ Absolute:
-`24000` t(1) r(0) @ 0
-`24000` t(1) r(0) @ 24000
-`24000` t(1) r(0) @ 48000
-`24000` t(1) r(0) @ 72000
-`24000` t(1) r(0) @ 96000
-`24000` t(1) r(0) @ 120000
-`24000` t(1) r(0) @ 144000
-`24000` t(1) r(0) @ 168000
-`Audio 1` t(2) r(0) @ 16384
-`Audio 1` t(2) r(0) @ 80832
-`Audio 1` t(2) r(0) @ 153024
-`Audio 2` t(3) r(0) @ 45440
-`Audio 2` t(3) r(0) @ 136448
-`Audio 3` t(4) r(0) @ 94528
+`24000` t(0) r(0) @ 0
+`Audio 1` t(1) r(0) @ 0
+`Audio 2` t(2) r(0) @ 0
+`Audio 3` t(3) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`24000` t(0) r(0) @ 0
+`Audio 1` t(1) r(0) @ 0
+`Audio 1` t(1) r(0) @ 0
+`Audio 2` t(2) r(0) @ 0
MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
-`24000` t(1) (24000.aif) @ 0 + 0, 24000
-`24000` t(1) (24000.aif) @ 24000 + 0, 24000
-`24000` t(1) (24000.aif) @ 48000 + 0, 24000
-`24000` t(1) (24000.aif) @ 72000 + 0, 24000
-`24000` t(1) (24000.aif) @ 96000 + 0, 24000
-`24000` t(1) (24000.aif) @ 120000 + 0, 24000
-`24000` t(1) (24000.aif) @ 144000 + 0, 24000
-`24000` t(1) (24000.aif) @ 168000 + 0, 24000
-`Audio 1` t(2) (24000.aif) @ 16384 + 0, 24000
-`Audio 1` t(2) (24000.aif) @ 80832 + 0, 24000
-`Audio 1` t(2) (24000.aif) @ 153024 + 0, 24000
-`Audio 2` t(3) (24000.aif) @ 45440 + 0, 24000
-`Audio 2` t(3) (24000.aif) @ 136448 + 0, 24000
-`Audio 3` t(4) (24000.aif) @ 94528 + 0, 24000'
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`Audio 1` t(1) (24000.aif) @ 0 + 0, 24000
+`Audio 2` t(2) (24000.aif) @ 0 + 0, 24000
+`Audio 3` t(3) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`24000` t(0) (24000.aif) @ 0 + 0, 24000
+`Audio 1` t(1) (24000.aif) @ 0 + 0, 24000
+`Audio 1` t(1) (24000.aif) @ 0 + 0, 24000
+`Audio 2` t(2) (24000.aif) @ 0 + 0, 24000'
run_test
diff --git a/tests/t.5/basicaudio3 b/tests/t.5/basicaudio3
index a8febd8..be921d7 100755
--- a/tests/t.5/basicaudio3
+++ b/tests/t.5/basicaudio3
@@ -28,21 +28,21 @@ Region (Region#) (WAV#) @ into-sample, length:
MIDI Region (Region#) @ into-sample, length:
Track name (Track#) (Region#) @ Absolute:
-`rhodes` t(1) r(4) @ 0
+`rhodes` t(0) r(4) @ 0
`rhodes` t(1) r(5) @ 0
`bass` t(2) r(0) @ 0
-`bass` t(2) r(1) @ 0
-`oerc` t(3) r(2) @ 0
-`oerc` t(3) r(3) @ 0
+`bass` t(3) r(1) @ 0
+`oerc` t(4) r(2) @ 0
+`oerc` t(5) r(3) @ 0
MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
-`rhodes` t(1) (rhodes_01.L) @ 0 + 0, 1528453
+`rhodes` t(0) (rhodes_01.L) @ 0 + 0, 1528453
`rhodes` t(1) (rhodes_01.R) @ 0 + 0, 1528453
`bass` t(2) (bass_01.L) @ 0 + 0, 1758775
-`bass` t(2) (bass_01.R) @ 0 + 0, 1758775
-`oerc` t(3) (oerc_01.L) @ 0 + 0, 1643572
-`oerc` t(3) (oerc_01.R) @ 0 + 0, 1643572'
+`bass` t(3) (bass_01.R) @ 0 + 0, 1758775
+`oerc` t(4) (oerc_01.L) @ 0 + 0, 1643572
+`oerc` t(5) (oerc_01.R) @ 0 + 0, 1643572'
run_test
diff --git a/tests/t.8/basicaudio b/tests/t.8/basicaudio
index 4b14eb4..ec37151 100755
--- a/tests/t.8/basicaudio
+++ b/tests/t.8/basicaudio
@@ -26,6 +26,9 @@ MIDI Region (Region#) @ into-sample, length:
Track name (Track#) (Region#) @ Absolute:
`4` t(0) r(1) @ 0
+`1` t(3) r(1) @ 3000
+`2` t(4) r(3) @ 32000
+`3` t(5) r(5) @ 52000
`4` t(0) r(1) @ 23000
`4` t(0) r(1) @ 46000
`4` t(0) r(1) @ 69000
@@ -35,14 +38,14 @@ Track name (Track#) (Region#) @ Absolute:
`4` t(0) r(1) @ 161000
`4` t(0) r(1) @ 184000
`4` t(0) r(1) @ 207000
-`1` t(3) r(1) @ 3000
-`2` t(4) r(3) @ 32000
-`3` t(5) r(5) @ 52000
MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
`4` t(0) (24000.wav) @ 0 + 1000, 23000
+`1` t(3) (24000.wav) @ 3000 + 1000, 23000
+`2` t(4) (24000.1.wav) @ 32000 + 8000, 16000
+`3` t(5) (24000.2.wav) @ 52000 + 2000, 22000
`4` t(0) (24000.wav) @ 23000 + 1000, 23000
`4` t(0) (24000.wav) @ 46000 + 1000, 23000
`4` t(0) (24000.wav) @ 69000 + 1000, 23000
@@ -51,9 +54,6 @@ Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
`4` t(0) (24000.wav) @ 138000 + 1000, 23000
`4` t(0) (24000.wav) @ 161000 + 1000, 23000
`4` t(0) (24000.wav) @ 184000 + 1000, 23000
-`4` t(0) (24000.wav) @ 207000 + 1000, 23000
-`1` t(3) (24000.wav) @ 3000 + 1000, 23000
-`2` t(4) (24000.1.wav) @ 32000 + 8000, 16000
-`3` t(5) (24000.2.wav) @ 52000 + 2000, 22000'
+`4` t(0) (24000.wav) @ 207000 + 1000, 23000'
run_test
diff --git a/tests/t.8/basicmidi b/tests/t.8/basicmidi
index f082970..02f7dd2 100755
--- a/tests/t.8/basicmidi
+++ b/tests/t.8/basicmidi
@@ -7,17 +7,11 @@ FILE=../../bins/midi345x.ptf
EXPECT='ProTools 8 Session: Samplerate = 48000Hz
Target samplerate = 48000
-0 wavs, 6 regions, 0 active regions
+0 wavs, 0 regions, 0 active regions
Audio file (WAV#) @ offset, length:
Region (Region#) (WAV#) @ into-sample, length:
-`MIDI 1-01` r(0) w(0) @ 0, 11520000
-`MIDI 1-02` r(1) w(0) @ 0, 8000000
-`MIDI 1-03` r(2) w(2) @ 0, 8000000
-`MIDI 1-04` r(3) w(1) @ 0, 8000000
-`MIDI 1-05` r(4) w(1) @ 0, 10000000
-`MIDI 3-01` r(5) w(3) @ 0, 4000000
MIDI Region (Region#) @ into-sample, length:
`MIDI 1-01` r(0) @ 0, 8000000
@@ -141,6 +135,8 @@ Track name (Track#) (Region#) @ Absolute:
MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
`MIDI 1` mt(0) mr(1) @ 0
+`MIDI 2` mt(1) mr(2) @ 8000000
+`MIDI 3` mt(2) mr(3) @ 16000000
`MIDI 1` mt(0) mr(5) @ 8000000
`MIDI 1` mt(0) mr(5) @ 12000000
`MIDI 1` mt(0) mr(5) @ 16000000
@@ -149,14 +145,12 @@ MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:
`MIDI 1` mt(0) mr(5) @ 28000000
`MIDI 1` mt(0) mr(5) @ 32000000
`MIDI 1` mt(0) mr(5) @ 36000000
-`MIDI 2` mt(1) mr(2) @ 8000000
`MIDI 2` mt(1) mr(5) @ 16000000
`MIDI 2` mt(1) mr(5) @ 20000000
`MIDI 2` mt(1) mr(5) @ 24000000
`MIDI 2` mt(1) mr(5) @ 28000000
`MIDI 2` mt(1) mr(5) @ 32000000
`MIDI 2` mt(1) mr(5) @ 36000000
-`MIDI 3` mt(2) mr(3) @ 16000000
`MIDI 3` mt(2) mr(3) @ 24000000
`MIDI 3` mt(2) mr(3) @ 32000000