failed to register callback for PulseAudio signal
Hi,
I'm trying to register a callback for a pulseaudio source device on the pulseaudio bus. see https://gist.github.com/r10r/5496667
I get the following error:
DBus::Error: Method "AddMatch" with signature "s" on interface "org.freedesktop.DBus" doesn't exist
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:407:in `block in send_sync_or_async'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:633:in `call'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:633:in `process'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:580:in `send_sync'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:405:in `send_sync_or_async'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/introspect.rb:274:in `block (2 levels) in define_method_from_descriptor'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/bus.rb:607:in `add_match'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/introspect.rb:325:in `on_signal'
from /var/lib/soundmaster/.gem/ruby/2.0.0/gems/ruby-dbus-0.9.1/lib/dbus/introspect.rb:455:in `on_signal'
from (irb):145
from /usr/bin/irb:12:in `'
Any idea what is going wrong here?
[soundmaster@blaubeere ~]$ dbus-daemon --version D-Bus Message Bus Daemon 1.6.8 Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Oh, I did not know that Pulseaudio runs a separate bus for itself. That will be fun to debug :)
Hmm, yeah. It took me a while to figure that out as well - but it is mentioned at the beginning of the pulse documentation. :) I have a working python example now - see https://gist.github.com/r10r/5501136 - but I definitely prefer the ruby version ;) I've also updated the gist https://gist.github.com/r10r/5496667 - unfortunately the problem still persists ...
I have pushed out a quick fix in the peer-connection branch. A proper fix will follow.
BTW I didn't know how to trigger a StateUpdated signal but fortunately VolumeUpdated is there as well.
hey cool, i'll try it out later the evening and will give you feedback. StateUpdated can be triggered by toggling pause/playback on the source. E g. I've connected my phone via bluez and toggle play/pause the media player (spotify)
Works fine now :D - Thanks a lot. Can you give me a short hint why it is not required to call AddMatch on the connection?
Fixed now