feat(sointu): add SynthService for recompiling the synth when needed

This commit is contained in:
vsariola
2021-02-05 22:21:46 +02:00
parent 6307dd51de
commit 5e7bd75b36
5 changed files with 85 additions and 62 deletions

View File

@ -13,6 +13,14 @@ import (
"github.com/vsariola/sointu/compiler"
)
type BridgeService struct {
}
func (s BridgeService) Compile(patch sointu.Patch) (sointu.Synth, error) {
synth, err := Synth(patch)
return synth, err
}
func Synth(patch sointu.Patch) (*C.Synth, error) {
s := new(C.Synth)
comPatch, err := compiler.Encode(&patch, compiler.AllFeatures{})