lua access mixer-api set-volume fails with gvariant assert
I am attempting to set the channelVolumes of any node via mixer-api, and I run into the following problems:
Running this script:
#!/usr/bin/wpexec
Core.require_api("default-nodes", "mixer", function(...)
local default_nodes, mixer = ...
local id = default_nodes:call("get-default-node", "Audio/Sink")
local volume = mixer:call("get-volume", id)
local volume = mixer:call("set-volume", id, volume)
Core.quit()
end)
results in the following error:
[70] torkel@pc47144-2150> wpexec ./test.lua ~/dev/wireplumber
**
GLib:ERROR:../../../glib/gvarianttypeinfo.c:164:g_variant_type_info_check: assertion failed: (info->alignment == 0 || info->alignment == 1 || info->alignment == 3 || info->alignment == 7)
Bail out! GLib:ERROR:../../../glib/gvarianttypeinfo.c:164:g_variant_type_info_check: assertion failed: (info->alignment == 0 || info->alignment == 1 || info->alignment == 3 || info->alignment == 7)
zsh: abort wpexec ./test.lua
Edited by Torkel Niklasson