Browse Source

Increase timeout on cadence-aloop-daemon, handles buffer-size changes better

tags/v0.9.0
falkTX 12 years ago
parent
commit
4222f7d8b3
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/cadence_aloop_daemon.py

+ 6
- 4
src/cadence_aloop_daemon.py View File

@@ -16,7 +16,7 @@ import jacklib

global doLoop, doRunNow
doLoop = True
doRunNow = True
doRunNow = False

# --------------------------------------------------
# Global JACK variables
@@ -62,7 +62,7 @@ def run_alsa_bridge():
#system("env JACK_SAMPLE_RATE=%i JACK_PERIOD_SIZE=%i zita-j2a -j jack2alsa -d hw:Loopback,1,1 -r 44100 &" % (sample_rate, buffer_size))

# Pause it for a bit, and connect to the system ports
sleep(1)
sleep(2)
jacklib.connect(client, "alsa2jack:capture_1", "system:playback_1")
jacklib.connect(client, "alsa2jack:capture_2", "system:playback_2")
jacklib.connect(client, "system:capture_1", "jack2alsa:playback_1")
@@ -72,14 +72,13 @@ def run_alsa_bridge():
if __name__ == '__main__':

# Init JACK client
client = jacklib.client_open("jack-aloop-daemon", 0, None)
client = jacklib.client_open("cadence-aloop-daemon", 0, None)

if not client:
quit()

jacklib.set_buffer_size_callback(client, buffer_size_callback, None)
jacklib.on_shutdown(client, shutdown_callback, None)

jacklib.activate(client)

# Quit when requested
@@ -90,6 +89,9 @@ if __name__ == '__main__':
sampleRate = jacklib.get_sample_rate(client)
bufferSize = jacklib.get_buffer_size(client)

# Run first-time
run_alsa_bridge()

# Keep running until told otherwise
while doLoop:
if doRunNow:


Loading…
Cancel
Save