New wireplumber config
This commit is contained in:
@@ -5,11 +5,25 @@
|
||||
--
|
||||
-- SPDX-License-Identifier: MIT
|
||||
|
||||
-- Receive script arguments from config.lua
|
||||
local config = ... or {}
|
||||
cutils = require ("common-utils")
|
||||
log = Log.open_topic ("s-monitors")
|
||||
|
||||
-- ensure config.properties is not nil
|
||||
config.properties = config.properties or {}
|
||||
defaults = {}
|
||||
defaults.node_properties = { -- Midi bridge node properties
|
||||
["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",
|
||||
}
|
||||
|
||||
config = {}
|
||||
config.monitoring = Core.test_feature ("monitor.alsa-midi.monitoring")
|
||||
config.node_properties = Conf.get_section_as_properties (
|
||||
"monitor.alsa-midi.properties", defaults.node_properties)
|
||||
|
||||
SND_PATH = "/dev/snd"
|
||||
SEQ_NAME = "seq"
|
||||
@@ -19,18 +33,10 @@ midi_node = nil
|
||||
fm_plugin = nil
|
||||
|
||||
function CreateMidiNode ()
|
||||
-- Midi properties
|
||||
local props = {}
|
||||
if type(config.properties["alsa.midi.node-properties"]) == "table" then
|
||||
props = config.properties["alsa.midi.node-properties"]
|
||||
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)
|
||||
local node = Node("spa-node-factory", config.node_properties)
|
||||
node:activate(Feature.Proxy.BOUND, function (n)
|
||||
Log.info ("activated Midi bridge")
|
||||
log:info ("activated Midi bridge")
|
||||
end)
|
||||
|
||||
return node;
|
||||
@@ -38,7 +44,7 @@ end
|
||||
|
||||
if GLib.access (SND_SEQ_PATH, "rw") then
|
||||
midi_node = CreateMidiNode ()
|
||||
elseif config.properties["alsa.midi.monitoring"] then
|
||||
elseif config.monitoring then
|
||||
fm_plugin = Plugin.find("file-monitor-api")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user