monitors/alsa-midi: move default property values in the Lua script

This commit is contained in:
George Kiagiadakis
2023-11-14 21:23:56 +02:00
parent 2f226aca75
commit 501f119803
2 changed files with 12 additions and 10 deletions

View File

@@ -16,14 +16,10 @@ monitor.alsa.midi.node-properties = {
## MIDI bridge node properties
## Name set for the node with ALSA MIDI ports
node.name = "Midi-Bridge"
# node.name = "Midi-Bridge"
## Removes longname/number from MIDI port names
api.alsa.disable-longname = true
## Set priorities so that it can be used as a fallback driver (see pipewire#3562)
priority.session = 100
priority.driver = 1
# api.alsa.disable-longname = false
}
monitor.alsa.vm.node.defaults = {

View File

@@ -24,14 +24,20 @@ fm_plugin = nil
function CreateMidiNode ()
-- Midi properties
local props = {}
local props = {
["factory.name"] = "api.alsa.seq.bridge",
-- Name set for the node with ALSA MIDI ports
["node.name"] = "Midi-Bridge",
-- Set priorities so that it can be used as a fallback driver (see pipewire#3562)
["priority.session"] = "100",
["priority.driver"] = "1",
}
for k, v in pairs(config.node_properties) do
props[k] = v
end
props["factory.name"] = "api.alsa.seq.bridge"
props["node.name"] = props["node.name"] or "Midi-Bridge"
-- create the midi node
local node = Node("spa-node-factory", props)
node:activate(Feature.Proxy.BOUND, function (n)