From e3c7d2cba44a25ed2b4a81d20359b17e1715b0bc Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Sun, 24 Sep 2023 17:38:06 +0300 Subject: [PATCH] fix(cmd/sointu-vsti): use different name and ID for native vsti plugin --- CHANGELOG.md | 5 +++++ cmd/sointu-vsti/main.go | 7 +++---- cmd/sointu-vsti/nameid_native.go | 6 ++++++ cmd/sointu-vsti/nameid_not_native.go | 6 ++++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 cmd/sointu-vsti/nameid_native.go create mode 100644 cmd/sointu-vsti/nameid_not_native.go diff --git a/CHANGELOG.md b/CHANGELOG.md index d3da988..075dcbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## Unreleased +### Fixed +- The sointu-vsti-native plugin has different plugin ID and plugin name + to not confuse it with the non-native one + ## v0.2.0 ### Added - Saving and loading instruments diff --git a/cmd/sointu-vsti/main.go b/cmd/sointu-vsti/main.go index 9b4eb3a..018999e 100644 --- a/cmd/sointu-vsti/main.go +++ b/cmd/sointu-vsti/main.go @@ -44,8 +44,7 @@ func (c *VSTIProcessContext) BPM() (bpm float64, ok bool) { func init() { var ( - uniqueID = [4]byte{'S', 'n', 't', 'u'} - version = int32(100) + version = int32(100) ) vst2.PluginAllocator = func(h vst2.Host) (vst2.Plugin, vst2.Dispatcher) { modelMessages := make(chan interface{}, 1024) @@ -58,11 +57,11 @@ func init() { context := VSTIProcessContext{make([]vst2.MIDIEvent, 100), h} buf := make([]float32, 2048) return vst2.Plugin{ - UniqueID: uniqueID, + UniqueID: PLUGIN_ID, Version: version, InputChannels: 0, OutputChannels: 2, - Name: "Sointu", + Name: PLUGIN_NAME, Vendor: "vsariola/sointu", Category: vst2.PluginCategorySynth, Flags: vst2.PluginIsSynth, diff --git a/cmd/sointu-vsti/nameid_native.go b/cmd/sointu-vsti/nameid_native.go new file mode 100644 index 0000000..a42772a --- /dev/null +++ b/cmd/sointu-vsti/nameid_native.go @@ -0,0 +1,6 @@ +//go:build native + +package main + +var PLUGIN_ID = [4]byte{'S', 'n', 't', 'N'} +var PLUGIN_NAME = "Sointu Native" diff --git a/cmd/sointu-vsti/nameid_not_native.go b/cmd/sointu-vsti/nameid_not_native.go new file mode 100644 index 0000000..6a89fc3 --- /dev/null +++ b/cmd/sointu-vsti/nameid_not_native.go @@ -0,0 +1,6 @@ +//go:build !native + +package main + +var PLUGIN_ID = [4]byte{'S', 'n', 't', 'u'} +var PLUGIN_NAME = "Sointu"