RaySession icon indicating copy to clipboard operation
RaySession copied to clipboard

Global stop and play button to start/stop all clients

Open newlaurent62 opened this issue 5 years ago • 2 comments

If you want to change jack settings, it's a good idea for some applications, to close them before changing jack settings.

So it will be nice to have a start button to start all remaining applications in one go as well as stop/save and stop/abort buttons for all clients currently started without closing or abort the session.

That would allow to abort or close all remaining clients without executing the close.sh/load.sh session ray-scripts. It may be a good idea to let decide the session if these operations (start/stop all remaining clients) are allowed (regarding the ray-scripts behavior). For example, attribute to raysession xml element could be added:

<RAYSESSION VERSION="0.9.0" name="Jamulus" 
    stop-abort-all-allowed="true|false" 
    stop-save-all-allowed="true|false" 
    start-all-allowed="true|false">

newlaurent62 avatar Jun 12 '20 22:06 newlaurent62

Sorry, I don't want to add this to the GUI, because most users wont have to use it, and a lot of them will use it in wrong situations. I think it will gives more confusion than a real nice feature. It is not a big thing for user to (save and) stop all clients. Those who know JACK a minimum know that they have to stop the programs before restarting JACK.

However, it is very easy to script this action, something like:

ray_control save

for client_id in $(ray_control list_clients started);do
    ray_control --detach client $client_id stop
    sleep 0.1
done

# wait 5s client stopping
i=0
while [ -n "$(ray_control list_clients started)" ];do
    sleep 0.5
    i=$((i+1)
    [ i -ge 10 ] && break
done

# kill still alive clients
for client_id in $(ray_control list_clients started);do
    ray_control client $client_id kill
done

Maybe such scriptable actions could be launched via GUI menu, but clearly not brought to the fore. The per session possibility to do that is IMO overrated.

Houston4444 avatar Jun 13 '20 14:06 Houston4444

Yes scriptable actions could be useful.

newlaurent62 avatar Jun 21 '20 21:06 newlaurent62