aboutsummaryrefslogtreecommitdiffstats
path: root/aataaj.lua
diff options
context:
space:
mode:
authordvs12024-10-25 09:38:35 +1000
committerdvs12024-10-25 09:38:35 +1000
commit31566d68cb3365ead1cdc8648c81d62ce966cb6f (patch)
treebbe3d4bc790530c6e955e21b18d1150d6036f73a /aataaj.lua
parentYet another TODO, YATODO. (diff)
downloadJackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.zip
JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.gz
JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.bz2
JackOnAllDevices-31566d68cb3365ead1cdc8648c81d62ce966cb6f.tar.xz
Just discovered the arg variable, use it and rename parseArgs() to just parse().
Diffstat (limited to '')
-rwxr-xr-xaataaj.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/aataaj.lua b/aataaj.lua
index 06077c2..6108dd5 100755
--- a/aataaj.lua
+++ b/aataaj.lua
@@ -143,8 +143,7 @@ local options =
143 ['--help'] = {help}, 143 ['--help'] = {help},
144} 144}
145 145
146local args = {...} 146_.parse(arg, options)
147_.parseArgs(options, args)
148 147
149 148
150 149
@@ -184,7 +183,7 @@ for i,l in ipairs(cards.lines) do
184 Cards[l]['devs'][n] = n 183 Cards[l]['devs'][n] = n
185 print("\tFound playback device " .. Cards[l].card - 1 .. " : " .. Cards[l]['name'] .. "\tDEVICE: " .. Cards[l]['playbackDevs'][j] .. ' ' .. n) 184 print("\tFound playback device " .. Cards[l].card - 1 .. " : " .. Cards[l]['name'] .. "\tDEVICE: " .. Cards[l]['playbackDevs'][j] .. ' ' .. n)
186 io.flush() 185 io.flush()
187 if 'JACK' ~= args[1] then 186 if 'JACK' ~= arg[1] then
188 print('\t\tALSA_CARD=' .. Cards[l].card - 1 .. ' ' .. speaker .. ' "Found playback device ' .. Cards[l].card - 1 .. ' : ' .. Cards[l]['name'] .. ' DEVICE: ' .. Cards[l]['playbackDevs'][j] .. ' ' .. n .. '"') 187 print('\t\tALSA_CARD=' .. Cards[l].card - 1 .. ' ' .. speaker .. ' "Found playback device ' .. Cards[l].card - 1 .. ' : ' .. Cards[l]['name'] .. ' DEVICE: ' .. Cards[l]['playbackDevs'][j] .. ' ' .. n .. '"')
189 io.flush() 188 io.flush()
190 end 189 end
@@ -221,7 +220,7 @@ print('')
221io.flush() 220io.flush()
222 221
223 222
224if 'start' == args[1] then 223if 'start' == arg[1] then
225 __('mkdir -p ' .. asoundrcPath):Do() 224 __('mkdir -p ' .. asoundrcPath):Do()
226 local a, e = io.open(asoundrcPath .. '/jack-plumbing', "w") 225 local a, e = io.open(asoundrcPath .. '/jack-plumbing', "w")
227 if nil == a then print("Could not open " .. asoundrcPath .. '/jack-plumbing') else 226 if nil == a then print("Could not open " .. asoundrcPath .. '/jack-plumbing') else
@@ -391,7 +390,7 @@ pcm.!default {
391 ]]) 390 ]])
392 a:close() 391 a:close()
393 end 392 end
394elseif 'JACK' == args[1] then 393elseif 'JACK' == arg[1] then
395 print('') 394 print('')
396 print("Start up JACK and friends.") 395 print("Start up JACK and friends.")
397 print("jack_control") 396 print("jack_control")