Jack Master cannot be set as default (won't load as Master)

Report anything that appears to be a bug here.

Moderator: jesse

Post Reply
ORL
Posts: 13
Joined: Tue Apr 07, 2009 3:32 pm

Jack Master cannot be set as default (won't load as Master)

Post by ORL »

OK, I just post the problem here, as it looks to be a bug. It comes from another post on this forum: http://www.essej.net/slforum/viewtopic. ... p=749#p749 , and here are the most revelant parts of it:
So, here it is, I've got sooperlooper running on a Debian GNU/Linux distribution, with many others apps at the same time.
I would like all apps to be sync to jack transport, and sooperlooper to be the jack master one.
Indeed, it works, but the fact is I can't get the setting 'sooperlooper as jack timebase master' fixed as a default. I tried saving a session, but it didn't work either, and I didn't find a command line option which would lead sooperlooper to start with this option enabled.
I've tried working with the gui_config.xml file, without success, too.
and some precisions:
I forgot to tell you that I had checked with a saved session, and took a look into the slsess file: the global parameter "jack_timebase_master" was set to 1, so it's probably something due to config file reading and not to config file saving.
I am not on the same PC by now, and cannot copy/paste the file, but it looked like:
<Globals alotofparameters="alotofvalues" jack_timebase_master="1"/>
I tried turning it to true, and to 0, but it always gave the same result.
Hope it helps.
ORL
Posts: 13
Joined: Tue Apr 07, 2009 3:32 pm

Re: Jack Master cannot be set as default (won't load as Master)

Post by ORL »

I'm sorry not to precise the version by now, but I'm not near from the machine on which it's installed.
However, I remember about something like 1.6.9, though it doesn't fit with the Debian packaged version, but it seems to fit this post I made on the forum:
http://www.essej.net/slforum/viewtopic. ... 3&start=10
ORL
Posts: 13
Joined: Tue Apr 07, 2009 3:32 pm

Re: Jack Master cannot be set as default (won't load as Master)

Post by ORL »

As I told in the other forum, I just wanted to tell that this bug doesn't seem to be fixed with 1.6.13 version.
I've looked, very quickly, into the code, but I cannot find where it is set. I go on with it.
ORL
Posts: 13
Joined: Tue Apr 07, 2009 3:32 pm

Re: Jack Master cannot be set as default (won't load as Master)

Post by ORL »

OK, I found it.
So, it was in: src/engine.cpp, around line 1674, you had a hack (I don't know why, I suppose there is a reason, but I coudln't figure out whichi one) like:

Code: Select all

          bool flag = gs_event->value > 0.0f;

          if (_driver->set_timebase_master(flag)) {
              _jack_timebase_master = flag;
          } else {
              _jack_timebase_master = false;
          }
I just replaces those lines by the following one:

Code: Select all

_jack_timebase_master = gs_event->value;
I also had to change something in src/gui/latency_panel.cpp, as timebase_master was once set to globals variable, and then to control. So here it is, replace this line:

Code: Select all

lcontrol.post_ctrl_change (-2, wxT("jack_timebase_master"), _jack_timebase_master_check->GetValue() ? 1.0f : 0.0f);
by this one

Code: Select all

lcontrol.post_global_ctrl_change (wxT("jack_timebase_master"), _jack_timebase_master_check->GetValue() ? 1.0f : 0.0f);
(for this last hack, I'm not sure it's absolutely necessary, but I think it may).

And it worked. Though, it doesn't check the box in GUI. It seems to be hard coded that it is set to uncheck, even if timebase master is set (in latency_panel.cpp, if I'm not wrong).

Hope it helps, and hope I'm not wrong.
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Jack Master cannot be set as default (won't load as Master)

Post by jesse »

Thanks for digging in there. There was a reason for the "hack", in that you are not guaranteed to actually succeed in getting jack master status, so if it failed (for whatever reason) then the control would reflect that. So the real question is why it rejects you on session load, but not later on (as I assume it does work when you manually turn it back on later).

Does it help? Do you actually get timemaster enabled with your changes?
Post Reply