mirror of
https://github.com/vsariola/sointu.git
synced 2025-09-26 23:25:39 -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:
parent
3881b8eb22
commit
602b3b05cc
@ -117,8 +117,11 @@ type (
|
||||
InputDevices(yield func(MIDIDevice) bool)
|
||||
Close()
|
||||
HasDeviceOpen() bool
|
||||
TryToOpenBy(name string, first bool)
|
||||
}
|
||||
|
||||
NullMIDIContext struct{}
|
||||
|
||||
MIDIDevice interface {
|
||||
String() string
|
||||
Open() error
|
||||
@ -385,6 +388,11 @@ func (d *modelData) Copy() modelData {
|
||||
return ret
|
||||
}
|
||||
|
||||
func (m NullMIDIContext) InputDevices(yield func(MIDIDevice) bool) {}
|
||||
func (m NullMIDIContext) Close() {}
|
||||
func (m NullMIDIContext) HasDeviceOpen() bool { return false }
|
||||
func (m NullMIDIContext) TryToOpenBy(name string, first bool) {}
|
||||
|
||||
func (m *Model) resetSong() {
|
||||
m.d.Song = defaultSong.Copy()
|
||||
for _, instr := range m.d.Song.Patch {
|
||||
|
Reference in New Issue
Block a user