feat(tracker): compile with midi support only when CGO is available

Also add the midi context to the VSTI, so VSTI can use MIDI if they
wish so.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-20 19:38:06 +03:00
parent 3881b8eb22
commit 602b3b05cc
7 changed files with 42 additions and 21 deletions

12
cmd/midi_not_cgo.go Normal file
View File

@ -0,0 +1,12 @@
//go:build !cgo
package cmd
import (
"github.com/vsariola/sointu/tracker"
)
func NewMidiContext(broker *tracker.Broker) tracker.MIDIContext {
// with no cgo, we cannot use MIDI, so return a null context
return tracker.NullMIDIContext{}
}