Rename get_sink to get_device as per latest pulseaudio_dbus changes

This commit is contained in:
Stefano Mazzucco 2017-06-01 22:29:23 +01:00
parent fd61d03f94
commit a80a9a39b6
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ function widget.notify(v)
end
function widget:update_sink(object_path)
self.sink = pulse.get_sink(self.connection, object_path)
self.sink = pulse.get_device(self.connection, object_path)
end
function widget.volume_up()

View File

@ -36,7 +36,7 @@ local address = pulse.get_address()
local connection = pulse.get_connection(address)
local core = pulse.get_core(connection)
local sink = pulse.get_sink(connection, core.Sinks[1])
local sink = pulse.get_device(connection, core.Sinks[1])
-- listen on ALL objects as sinks may change
core:ListenForSignal("org.PulseAudio.Core1.Device.VolumeUpdated", {})
@ -70,7 +70,7 @@ core:ListenForSignal("org.PulseAudio.Core1.NewSink", {core.object_path})
core:connect_signal(
function (_, newsinks)
print(string.format("NewSink: %s", newsinks[1]))
sink = pulse.get_sink(connection, newsinks[1])
sink = pulse.get_device(connection, newsinks[1])
connect_sink(sink)
end,
"NewSink"