Skip to content

Commit

Permalink
Server: revert changes to Linux startup sequence accidentally introdu…
Browse files Browse the repository at this point in the history
…ced in efc9a5e

The option to pass JACK to PulseAudio shouldn't be hardcoded, and should
instead be implemented using an option in the server at some point
- but that's for another time!
  • Loading branch information
SunderB committed Jan 30, 2021
1 parent c1fb3eb commit 76fada3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions app/server/ruby/lib/sonicpi/scsynthexternal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -446,25 +446,23 @@ def boot_server_linux
if `ps cax | grep jackd`.split(" ").first.nil?
#Jack not running - start a new instance
puts "Jackd not running on system. Starting..."
jackCmd="jackd -T -ddummy -r48000 -p1024"
jack_pid = spawn "exec #{jackCmd}"
jackCmd = "jackd -R -T -p 32 -d alsa -n 3 -p 2048 -r 44100"
jack_pid = spawn "exec #{jackCmd}"
register_process jack_pid
else
puts "Jackd already running. Not starting another server..."
end

local_scsynth_opts = {}

scsynth_opts = @default_scsynth_opts.merge(local_scsynth_opts).merge(@user_scsynth_opts)

boot_and_wait(scsynth_path, scsynth_opts)

`jack_connect SuperCollider:in_1 system_capture_1`
`jack_connect SuperCollider:in_2 system_capture_2`
`pactl load-module module-jack-source connect=0 client_name=JACK_to_PulseAudio`
`pactl load-module module-loopback source=jack_in`
`jack_connect SuperCollider:out_1 JACK_to_PulseAudio:front-left`
`jack_connect SuperCollider:out_2 JACK_to_PulseAudio:front-right`
`jack_connect SuperCollider:out_1 system:playback_1`
`jack_connect SuperCollider:out_2 system:playback_2`
`jack_connect SuperCollider:in_1 system:capture_1`
`jack_connect SuperCollider:in_2 system:capture_2`
end
end
end

0 comments on commit 76fada3

Please sign in to comment.