Getting information about the current jack session

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
devilock76
Established Member
Posts: 84
Joined: Fri Feb 11, 2011 4:31 pm

Getting information about the current jack session

Post by devilock76 »

I am making a small utility in golang. No not a wrapper for the jack api at this time.

Anyway one of the things I need to do is get current information about a running jack session.

I do not see a way to do this from jackd

I would prefer not to have to directly call the jack api in this program yet. In the future maybe.

I looked at ~/.config/jack and I can see a lot of what I need there, but is this really the best way to do it.

The information I need:
1. First of all, obviously is jack running
2. Card being used by jack
3. Current jack sample rate and bit depth

This really is the first program I am doing of this nature and well to be honest it is my second golang learning project I am doing that has any real world use.

And frankly it is more of something I just need as a helper to protect me from my own stupidity when setting up my environment for recording in a production scenario. In other words I question how universally useful the end product will be. But I needed another project and this is something I had a need for.

I did a forum search but did not find anything, nor did I find anything through several google searches.

Ken
devilock76
Established Member
Posts: 84
Joined: Fri Feb 11, 2011 4:31 pm

Re: Getting information about the current jack session

Post by devilock76 »

I can live with that. Is there a way to get it without going right to the API though. But perhaps better than the conf.xml file?

Ken
devilock76
Established Member
Posts: 84
Joined: Fri Feb 11, 2011 4:31 pm

Re: Getting information about the current jack session

Post by devilock76 »

That is what I was starting to figure.

For first round proof of concept I will try the xml file to get some info, combined with /proc/asound/cards and a custom config file for this program.

The next version will have to implement calls to the api. This really quite a simple helper utility so we shall see.

Quick questions if I can on a side note. I pretty much only use Debian based systems, and typically by that I mean Debian itself, combined with KXstudio. Anyway regardless of which linux someone is using can ~/.config/jack/conf.xml and /proc/asound/cards be counted on? As in I should be able to expect those in those locations in most sanely configured systems such of type Fedora, Arch, or even Slackware? Sorry don't have instances of those handy right now and if someone knows already to save setting up a VM out the gate that would be great.

Yes I know I am using a very poor mans war around this by using those conf files.

Ken
devilock76
Established Member
Posts: 84
Joined: Fri Feb 11, 2011 4:31 pm

Re: Getting information about the current jack session

Post by devilock76 »

OK. Sounds like as I move forward with this I am going to need to create several testing environments eventually to make it more universal. Thank you for all of the input on this.

Ken
Post Reply