35 lines
739 B
Lua
35 lines
739 B
Lua
|
stream_defaults = {}
|
||
|
stream_defaults.enabled = true
|
||
|
|
||
|
stream_defaults.properties = {
|
||
|
["restore-props"] = true,
|
||
|
["restore-target"] = true,
|
||
|
["default-channel-volume"] = 0.9,
|
||
|
}
|
||
|
|
||
|
stream_defaults.rules = {
|
||
|
{
|
||
|
matches = {
|
||
|
{
|
||
|
{ "node.nick", "matches", "USB PnP Audio Device" },
|
||
|
},
|
||
|
},
|
||
|
apply_properties = {
|
||
|
["state.restore-props"] = false,
|
||
|
["state.restore-target"] = false,
|
||
|
["state.default-channel-volume"] = 0.9,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
function stream_defaults.enable()
|
||
|
if stream_defaults.enabled == false then
|
||
|
return
|
||
|
end
|
||
|
|
||
|
load_script("restore-stream.lua", {
|
||
|
properties = stream_defaults.properties,
|
||
|
rules = stream_defaults.rules,
|
||
|
})
|
||
|
end
|