fix: sointu-play should use cmd.MainSynther (#174)

This way you can choose if you want to use the native synth or the 
go synth by defining the build tag native.
This commit is contained in:
qm210 2024-10-25 10:03:08 +02:00 committed by GitHub
parent 8dfadacafe
commit eb9413b9a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -50,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Numeric updown widget calculated dp-to-px conversion incorrectly, resulting in
wrong scaling ([#150][i150])
- Empty patch should not crash the native synth ([#148][i148])
- sointu-play does not default to the native synth yet, choose via `-tags=native`
### Changed
- The keyboard shortcuts are now again closer to what they were old trackers

View File

@ -4,6 +4,7 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/vsariola/sointu/cmd"
"io/ioutil"
"os"
"path/filepath"
@ -14,7 +15,6 @@ import (
"github.com/vsariola/sointu"
"github.com/vsariola/sointu/oto"
"github.com/vsariola/sointu/version"
"github.com/vsariola/sointu/vm/compiler/bridge"
)
func main() {
@ -93,7 +93,7 @@ func main() {
return fmt.Errorf("the song could not be parsed as .json (%v) or .yml (%v)", errJSON, errYaml)
}
}
buffer, err := sointu.Play(bridge.NativeSynther{}, song, nil) // render the song to calculate its length
buffer, err := sointu.Play(cmd.MainSynther, song, nil) // render the song to calculate its length
if err != nil {
return fmt.Errorf("sointu.Play failed: %v", err)
}