mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
refactor(sointu): Change the signature of Play to accept SynthService instead of Synth
This is more logical as every single use of Play started with compiling the patch of a song with a SynthService.
This commit is contained in:
@ -88,16 +88,7 @@ func main() {
|
||||
return fmt.Errorf("the song could not be parsed as .json (%v) or .yml (%v)", errJSON, errYaml)
|
||||
}
|
||||
}
|
||||
synth, err := bridge.Synth(song.Patch)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create synth based on the patch: %v", err)
|
||||
}
|
||||
if !*unreleased {
|
||||
for i := 0; i < 32; i++ {
|
||||
synth.Release(i)
|
||||
}
|
||||
}
|
||||
buffer, _, err := sointu.Play(synth, song) // render the song to calculate its length
|
||||
buffer, _, err := sointu.Play(bridge.BridgeService{}, song, !*unreleased) // render the song to calculate its length
|
||||
if err != nil {
|
||||
return fmt.Errorf("sointu.Play failed: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user