mirror of
https://github.com/vsariola/sointu.git
synced 2026-08-16 22:56:58 -04:00
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:
@@ -13,18 +13,10 @@ import (
|
||||
|
||||
type NullContext struct{}
|
||||
|
||||
func (NullContext) FinishBlock(frame int) {}
|
||||
|
||||
func (NullContext) BPM() (bpm float64, ok bool) {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
func (NullContext) InputDevices(yield func(tracker.MIDIDevice) bool) {}
|
||||
|
||||
func (NullContext) HasDeviceOpen() bool { return false }
|
||||
|
||||
func (NullContext) Close() {}
|
||||
|
||||
type modelFuzzState struct {
|
||||
model *tracker.Model
|
||||
clipboard []byte
|
||||
@@ -261,7 +253,7 @@ func FuzzModel(f *testing.F) {
|
||||
reader := bytes.NewReader(slice)
|
||||
synther := vm.GoSynther{}
|
||||
broker := tracker.NewBroker()
|
||||
model := tracker.NewModel(broker, synther, NullContext{}, "")
|
||||
model := tracker.NewModel(broker, synther, tracker.NullMIDIContext{}, "")
|
||||
player := tracker.NewPlayer(broker, synther)
|
||||
buf := make([][2]float32, 2048)
|
||||
closeChan := make(chan struct{})
|
||||
|
||||
Reference in New Issue
Block a user