fix(sointu): fix sync data getting output from play & test it

This commit is contained in:
vsariola
2021-03-10 09:06:42 +02:00
parent df9713865f
commit 43ef6fa72c
2 changed files with 6 additions and 3 deletions

View File

@ -45,7 +45,7 @@ func TestAllRegressionTests(t *testing.T) {
if err != nil {
t.Fatalf("Compiling patch failed: %v", err)
}
buffer, _, err := sointu.Play(synth, song)
buffer, syncBuffer, err := sointu.Play(synth, song)
buffer = buffer[:song.Score.LengthInRows()*song.SamplesPerRow()*2] // extend to the nominal length always.
if err != nil {
t.Fatalf("Play failed: %v", err)
@ -72,6 +72,9 @@ func TestAllRegressionTests(t *testing.T) {
}
}
compareToRawFloat32(t, buffer, testname+".raw")
if strings.Contains(testname, "sync") {
compareToRawFloat32(t, syncBuffer, testname+"_syncbuf.raw")
}
})
}
}