spatialaudio / jackclient-python

🂻 JACK Audio Connection Kit (JACK) Client for Python :snake:
https://jackclient-python.readthedocs.io/
MIT License
132 stars 26 forks source link

Metadata example not working #69

Closed lucianoiam closed 4 years ago

lucianoiam commented 4 years ago

I get an error when running the metadata example, JACK-Client 0.5.0, Python 3.7.3, Ubuntu 19.04:

Traceback (most recent call last):
  File "metadata.py", line 12, in <module>
    client.set_property(client, jack.METADATA_PRETTY_NAME, 'Best Client Ever')
  File "/home/user/.local/lib/python3.7/site-packages/jack.py", line 1520, in set_property
    .format(key, subject))
ValueError: Unable to set property 'http://jackaudio.org/metadata/pretty-name' for subject 0
mgeier commented 4 years ago

I'm not sure, but this might only work in the latest version of JACK2.

If you are already using the latest JACK2, you could try JACK1 instead, which had metadata support earlier.

lucianoiam commented 4 years ago

Thanks, I tried JACK1 0.125.0rc1 and works as expected:

Client "pretty" name: (b'Best Client Ever', '')
Port "pretty" name: (b'a good port', 'text/plain')
All client properties:
{'http://jackaudio.org/metadata/pretty-name': (b'Best Client Ever', '')}
All port properties:
{'http://jackaudio.org/metadata/pretty-name': (b'a good port', 'text/plain')}
All properties:
{4294967309: {'http://jackaudio.org/metadata/pretty-name': (b'a good port',
                                                            'text/plain')},
 8589934596: {'http://jackaudio.org/metadata/pretty-name': (b'Best Client Ever',
                                                            '')}}
lucianoiam commented 4 years ago

I also confirm that metadata works when running JACK2 1.9.13, but fails for 1.9.12 (ie, the public binaries at http://jackaudio.org/downloads/). You were completely right, thanks.