mirror of
https://github.com/vsariola/sointu.git
synced 2025-10-05 11:35:00 -04:00
refactor(vm): use vm.GoSynther{}.Synth instead of vm.Synth
vm.Synth was used only in a few places, reduce the number of exported functions. Also, if we ever add some global configuration to GoSynther e.g. samplerate, we have a mechanism to do so, instead of the Synth function.
This commit is contained in:
parent
7675121a78
commit
960bddfae0
@ -78,7 +78,7 @@ func TestStackUnderflow(t *testing.T) {
|
||||
patch := sointu.Patch{sointu.Instrument{NumVoices: 1, Units: []sointu.Unit{
|
||||
sointu.Unit{Type: "pop", Parameters: map[string]int{}},
|
||||
}}}
|
||||
synth, err := vm.Synth(patch, 120)
|
||||
synth, err := vm.GoSynther{}.Synth(patch, 120)
|
||||
if err != nil {
|
||||
t.Fatalf("bridge compile error: %v", err)
|
||||
}
|
||||
@ -94,7 +94,7 @@ func TestStackBalancing(t *testing.T) {
|
||||
sointu.Instrument{NumVoices: 1, Units: []sointu.Unit{
|
||||
sointu.Unit{Type: "push", Parameters: map[string]int{}},
|
||||
}}}
|
||||
synth, err := vm.Synth(patch, 120)
|
||||
synth, err := vm.GoSynther{}.Synth(patch, 120)
|
||||
if err != nil {
|
||||
t.Fatalf("bridge compile error: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user