Skip to content
Merged
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
8 changes: 4 additions & 4 deletions app/server/ruby/bin/daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ def initialize(ports, no_scsynth_inputs=false)
Util.log "Unified Audio Settings toml hash: #{opts.inspect}"
opts = scsynth_inputs_hash.merge(opts)
Util.log "Combined Audio Settings toml hash with GUI scsynth inputs hash: #{opts.inspect}"
opts = merge_opts(opts)
opts = merge_opts(toml_opts_hash, opts)
Util.log "Merged Audio Settings toml hash: #{opts.inspect}"
@num_inputs = opts["-i"].to_i
@num_outputs = opts["-o"].to_i
Expand Down Expand Up @@ -1279,18 +1279,18 @@ def unify_toml_opts_hash(toml_opts_hash)
opts
end

def merge_opts(opts)
def merge_opts(toml_opts_hash, opts)
# extract scsynth opts override
begin
clobber_opts_a = Shellwords.split(opts.fetch(:scsynth_opts_override, ""))
clobber_opts_a = Shellwords.split(toml_opts_hash.fetch(:scsynth_opts_override, ""))
scsynth_opts_override = clobber_opts_a.each_slice(2).to_h
rescue
scsynth_opts_override = {}
end

# extract scsynth opts
begin
scsynth_opts_a = Shellwords.split(opts.fetch(:scsynth_opts, ""))
scsynth_opts_a = Shellwords.split(toml_opts_hash.fetch(:scsynth_opts, ""))
scsynth_opts = scsynth_opts_a.each_slice(2).to_h
rescue
scsynth_opts = {}
Expand Down