fix(cmd/sointu-vsti): use different name and ID for native vsti plugin

This commit is contained in:
5684185+vsariola@users.noreply.github.com 2023-09-24 17:38:06 +03:00
parent 545f32bcc3
commit e3c7d2cba4
4 changed files with 20 additions and 4 deletions

View File

@ -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

View File

@ -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,

View File

@ -0,0 +1,6 @@
//go:build native
package main
var PLUGIN_ID = [4]byte{'S', 'n', 't', 'N'}
var PLUGIN_NAME = "Sointu Native"

View File

@ -0,0 +1,6 @@
//go:build !native
package main
var PLUGIN_ID = [4]byte{'S', 'n', 't', 'u'}
var PLUGIN_NAME = "Sointu"