Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified session_scripts/save_via_window/ray-scripts/save_via_windows.sh
100644 → 100755
Empty file.
Empty file modified session_scripts/slow_open/ray-scripts/load.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions src/bin/conf_testou.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin env python3
#!/usr/bin/env python3

import time
da = dict[str, float]()
Expand Down Expand Up @@ -51,4 +51,4 @@ def set_proc_name(new_name: str):
da['set_proc_name'] = time.time()

for key, value in da.items():
print(value, key)
print(value, key)
Empty file modified src/bin/qt6_app.py
100644 → 100755
Empty file.
71 changes: 0 additions & 71 deletions src/bin/utility_script_starter.sh

This file was deleted.

2 changes: 0 additions & 2 deletions src/jack_config_script/get_diff.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash

source shared.sh || exit 0

ray_operation=load
Expand Down
6 changes: 3 additions & 3 deletions src/jack_config_script/load_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if $RAY_JACK_RELIABILITY_CHECK && [[ "$(current_value_of reliable_infos)" == 0 ]
reconfigure_pulseaudio force as_it_just_was
fi
fi

exit 0
fi

Expand All @@ -61,7 +61,7 @@ if has_different_value /driver/rate;then
start_jack
reconfigure_pulseaudio
fi

exit 0
fi

Expand All @@ -78,7 +78,7 @@ if [ -z "$(echo "$diff_parameters"|grep -e ^/engine/ -e ^/driver/ -e ^/internals
set_jack_parameters
start_jack
fi

reconfigure_pulseaudio
else
check_device
Expand Down
36 changes: 17 additions & 19 deletions src/jack_config_script/locale.sh
Original file line number Diff line number Diff line change
@@ -1,104 +1,102 @@
#!/bin/bash

case "$LANG" in
en_*)
tr_script_info_loadanyway(){
echo "<p><em>To open this session anyway,<br>"
echo "de-activate session scripts.</em></p>"
}

tr_start_jack_failed_load(){
echo "<p>Failed to start JACK."
echo "Session open cancelled !</p>"
tr_script_info_loadanyway
}

tr_start_jack_failed_close(){
echo "<p>Failed to start JACK."
echo "Your previous configuration can't be restored.</p>"
}

tr_device_not_connected_load(){
echo "<p>Device <strong>$1</strong> is not connected !"
echo "Session open cancelled.</p>"
tr_script_info_loadanyway
}

tr_device_not_connected_close(){
echo "<p>Device <strong>$1</strong> is not connected !"
echo "Your previous configuration can't be restored.</p>"
}

tr_waiting_jack_infos="Waiting for JACK infos..."
tr_starting_jack="Starting JACK"
tr_stopping_clients="Stopping clients"
tr_stopping_jack="Stopping JACK"
tr_reconfigure_pulseaudio="Reconfigure PulseAudio"
;;

fr_*)
tr_script_info_loadanyway(){
echo "<p><em>Pour ouvrir cette session malgré tout,<br>"
echo "désactivez les scripts de session.</em></p>"
}

tr_start_jack_failed_load(){
echo "<p>Échec du démarrage de JACK."
echo "L'ouverture de la session est abandonnée.</p>"
tr_script_info_loadanyway
}

tr_start_jack_failed_close(){
echo "<p>Échec du démarrage de JACK."
echo "Votre ancienne configuration n'a pas pu être restaurée.</p>"
}

tr_device_not_connected_load(){
echo "<p>L'interface <strong>$1</strong> n'est pas connectée !<br>"
echo "L'ouverture de la session est abandonnée.</p>"
tr_script_info_loadanyway
}

tr_device_not_connected_close(){
echo "L'interface $1 n'est pas connectée !"
echo "Votre ancienne configuration n'a pas pu être restaurée."
}

tr_waiting_jack_infos="Attente des infos de JACK..."
tr_starting_jack="Démarrage de JACK"
tr_stopping_clients="Arrêt des clients"
tr_stopping_jack="Arrêt de JACK"
tr_reconfigure_pulseaudio="Reconfiguration de PulseAudio"
;;

* )
tr_script_info_loadanyway(){
echo "<p><em>To open this session anyway,<br>"
echo "de-activate session scripts.</em></p>"
}

tr_start_jack_failed_load(){
echo "<p>Failed to start JACK."
echo "Session open cancelled !</p>"
tr_script_info_loadanyway
}

tr_start_jack_failed_close(){
echo "<p>Failed to start JACK."
echo "Your previous configuration can't be restored.</p>"
}

tr_device_not_connected_load(){
echo "<p>Device <strong>$1</strong> is not connected !"
echo "Session open cancelled.</p>"
tr_script_info_loadanyway
}

tr_device_not_connected_close(){
echo "<p>Device <strong>$1</strong> is not connected !"
echo "Your previous configuration can't be restored.</p>"
}

tr_waiting_jack_infos="Waiting for JACK infos..."
tr_starting_jack="Starting JACK"
tr_stopping_clients="Stopping clients"
Expand Down
13 changes: 6 additions & 7 deletions src/jack_config_script/pulse2jack_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def set_value_with_key(self, key: str, value: str):
self.channels = value
elif key == 'connect':
self.connected = value

def get_load_module_string(self)->str:
string = "load-module module-jack-%s" % self.type
if self.channels:
Expand All @@ -84,7 +84,7 @@ def get_load_module_string(self)->str:
if self.name:
string += " client_name=\"%s\"" % self.name.replace('"', '\\"')
return string

def get_save_string(self)->str:
str_base = "pulseaudio_%s%s" % (self.type, self.number_in_file)
save_list = []
Expand All @@ -95,7 +95,7 @@ def get_save_string(self)->str:
if self.connected:
save_list.append("%s_connect:%s" % (str_base, self.connected))
return '\n'.join(save_list)


def rewrite_config_file(file_path: str, keys: dict):
if not os.access(file_path, os.W_OK):
Expand Down Expand Up @@ -261,7 +261,7 @@ def get_save_string(existing_modules: list)->str:
bridge.number_in_file = str(n_source)
n_source += 1

return '\n'.join([b.get_save_string() for b in existing_modules])
return '\n'.join([b.get_save_string() for b in existing_modules])

def unload_and_load_modules(wanted_modules, existing_modules):
"""Unload unwanted PulseAudio JACK modules
Expand Down Expand Up @@ -319,7 +319,7 @@ def unload_and_load_modules(wanted_modules, existing_modules):
if len(sys.argv) < 2:
sys.stderr.write('argument required.\n')
sys.exit(1)

# init the pulse config files if needed
init_pulse_config_files()

Expand All @@ -334,7 +334,7 @@ def unload_and_load_modules(wanted_modules, existing_modules):

pactl_contents = pactl_prc.stdout.decode()
existing_modules = pactl_contents_to_bridge_list(pactl_contents)

if sys.argv[1] == '--save':
if pactl_prc.returncode:
sys.exit()
Expand All @@ -346,4 +346,3 @@ def unload_and_load_modules(wanted_modules, existing_modules):
if pactl_prc.returncode:
start_pulseaudio()
unload_and_load_modules(wanted_modules, existing_modules)

Loading