Browse Source

Cadence: Don't auto-start JACK or stop processes at login by default

tags/v0.9.0
falkTX 12 years ago
parent
commit
76725e09cc
2 changed files with 8 additions and 7 deletions
  1. +1
    -1
      src/cadence.py
  2. +7
    -6
      src/cadence_session_start.py

+ 1
- 1
src/cadence.py View File

@@ -2052,7 +2052,7 @@ class CadenceMainW(QMainWindow, ui_cadence.Ui_CadenceMainW):

usingAlsaLoop = bool(GlobalSettings.value("ALSA-Audio/BridgeIndexType", iAlsaFileNone, type=int) == iAlsaFileLoop)

self.cb_jack_autostart.setChecked(GlobalSettings.value("JACK/AutoStart", True, type=bool))
self.cb_jack_autostart.setChecked(GlobalSettings.value("JACK/AutoStart", False, type=bool))
self.cb_a2j_autostart.setChecked(GlobalSettings.value("A2J/AutoStart", True, type=bool))
self.cb_pulse_autostart.setChecked(GlobalSettings.value("Pulse2JACK/AutoStart", havePulseAudio and not usingAlsaLoop, type=bool))



+ 7
- 6
src/cadence_session_start.py View File

@@ -22,6 +22,11 @@ DBus = DBus()

# Start JACK, A2J and Pulse, according to user settings
def startSession():
# Check if JACK is set to auto-start
if not GlobalSettings.value("JACK/AutoStart", False, type=bool):
print("JACK is set to NOT auto-start on login")
return True

# Kill all audio processes first
stopAllAudioProcesses()

@@ -34,11 +39,6 @@ def startSession():
except:
DBus.a2j = None

# Load settings (JACK etc)
if not GlobalSettings.value("JACK/AutoStart", True, type=bool):
print("JACK is set to NOT auto-start on login")
return True

if GlobalSettings.value("JACK/AutoLoadLadishStudio", False, type=bool):
try:
ladish_control = DBus.bus.get_object("org.ladish", "/org/ladish/Control")
@@ -51,7 +51,6 @@ def startSession():
except:
ladish_conf = None

ladishNotifyHack = False
ladishStudioName = dbus.String(GlobalSettings.value("JACK/LadishStudioName", "", type=str))
ladishStudioListDump = ladish_control.GetStudioList()

@@ -60,6 +59,8 @@ def startSession():
if ladish_conf and ladish_conf.get('/org/ladish/daemon/notify')[0] == "true":
ladish_conf.set('/org/ladish/daemon/notify', "false")
ladishNotifyHack = True
else:
ladishNotifyHack = False

ladish_control.LoadStudio(thisStudioName)
ladish_studio = DBus.bus.get_object("org.ladish", "/org/ladish/Studio")


Loading…
Cancel
Save