jack connect regex question

This forum is about all development around libVLC.
RichardC66
New Cone
New Cone
Posts: 2
Joined: 14 Jun 2019 20:03

jack connect regex question

Postby RichardC66 » 15 Jun 2019 14:15

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

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: jack connect regex question

Postby sherington » 15 Jun 2019 20:01

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().

RichardC66
New Cone
New Cone
Posts: 2
Joined: 14 Jun 2019 20:03

Re: jack connect regex question

Postby RichardC66 » 15 Jun 2019 22:24

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests