From eb9413b9a012dbfd9626ef12c6a4d095cd54c6f4 Mon Sep 17 00:00:00 2001 From: qm210 <37247474+qm210@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:03:08 +0200 Subject: [PATCH] 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. --- CHANGELOG.md | 1 + cmd/sointu-play/main.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e09e6..52ee98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cmd/sointu-play/main.go b/cmd/sointu-play/main.go index aea297a..52359e3 100644 --- a/cmd/sointu-play/main.go +++ b/cmd/sointu-play/main.go @@ -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) }