Page 1 of 1

jack connect regex question

Posted: 15 Jun 2019 14:15
by RichardC66
Hi

As this is my first post, let me say thank you very much for VLC, it is a great app, which I have used for many years.

Now to my question: I have a suite of apps that I am developing for stage use (by me, not commercial) that includes a Linux based audio/midi sequencer/controller and some graphics display panels. They are written in Qt and originally I used the Qt multimedia tools for the audio. This became limiting as I wanted to introduce more audio channels as well as the jack connection kit to route multiple outputs. While looking for a more flexible API I was very happy to find libvlc, with which I have now successfully replaced Qt multimedia. The front end is still Qt. I'm using libvlc-3.0.4 from the libvlc-dev package on Debian.

Everything is working very well, but when it came to setting the jack client name with a regex string, the only way I could find to make this work was calling libvlc_new() with the —jack-connect-regex argument.

I looked at calling libvlc_audio_device_set() after setting the audio output, but I can’t seem to find the right syntax, or I am misunderstanding it’s use (which is quite likely). Unfortunately, it fails silently, so I am not sure where any error lies.

Of course using libvlc_new() could break with future changes and also means that I have to destroy and re-make a new libvlc each time I change output, which is okay, but due to the design of my app, I would prefer to avoid.

My question is whether libvlc_new() is the only way to achieve this, or is there a function like libvlc_audio_device_set() that I have missed, or am I just being dumb about the syntax?

I realise that this is probably a very rudimentary question, but I am very new to libvlc world.

Thanks,

Richard

Re: jack connect regex question

Posted: 15 Jun 2019 20:01
by sherington
Did you try and find your device using these other API methods?

Code: Select all

libvlc_audio_output_list_get libvlc_audio_output_device_enum libvlc_audio_output_device_list_get
If you can find your device one of those methods will have the precise device string you need to set when you call libvlc_audio_output_device_set - the documentation for that method in fact says (in part):

Code: Select all

* A list of adequate potential device strings can be obtained with * libvlc_audio_output_device_enum().

Re: jack connect regex question

Posted: 15 Jun 2019 22:24
by RichardC66
Thank you very much for the reply.

To be honest, although I thought I had read the documentation carefully, that little gem slipped by me. I will try those methods as soon as I can.

Thank you for your help,

Richard