aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordvs12024-11-04 13:48:31 +1000
committerdvs12024-11-04 13:48:31 +1000
commit66c6ac367f964aeb49df5be3957de70f306c14e9 (patch)
tree1c43953f940df7fed92ae6355236c0f4e9901e44
parentCopy paste error, actually name it purging. (diff)
downloadJackOnAllDevices-66c6ac367f964aeb49df5be3957de70f306c14e9.zip
JackOnAllDevices-66c6ac367f964aeb49df5be3957de70f306c14e9.tar.gz
JackOnAllDevices-66c6ac367f964aeb49df5be3957de70f306c14e9.tar.bz2
JackOnAllDevices-66c6ac367f964aeb49df5be3957de70f306c14e9.tar.xz
The command might not be the first argument.
-rwxr-xr-xaataaj.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/aataaj.lua b/aataaj.lua
index 403593d..fe0d2a4 100755
--- a/aataaj.lua
+++ b/aataaj.lua
@@ -81,15 +81,15 @@ NOTE - Seems both ALSA and JACK are per user. So you need to run
81]] 81]]
82Version = '0.0 crap' 82Version = '0.0 crap'
83 83
84 84local cmd = ''
85local options = 85local options =
86{ 86{
87 start = {help = 'Command to start the scanning process, for Sys V init.', }, 87 start = {help = 'Command to start the scanning process, for Sys V init.', func = function(self, options, a, args, i) cmd = 'start' end},
88 restart = {start}, 88 restart = {start},
89 ['force-reload'] = {start}, 89 ['force-reload'] = {start},
90 status = {help = 'Command to check the status of the scanning process, for Sys V init.', }, 90 status = {help = 'Command to check the status of the scanning process, for Sys V init.', },
91 stop = {help = 'Command to stop the scanning process, for Sys V init.', }, 91 stop = {help = 'Command to stop the scanning process, for Sys V init.', },
92 JACK = {help = 'Command to start the JACK stuff, for users.', }, 92 JACK = {help = 'Command to start the JACK stuff, for users.', func = function(self, options, a, args, i) cmd = 'JACK' end},
93 STOP = 93 STOP =
94 { 94 {
95 help = 'Command to stop the JACK stuff, for users.', 95 help = 'Command to stop the JACK stuff, for users.',
@@ -223,7 +223,7 @@ for i,l in ipairs(cards.lines) do
223 Cards[n]['devs'][m] = m 223 Cards[n]['devs'][m] = m
224 print('\tFound playback device ' .. Cards[n].card - 1 .. ' : ' .. Cards[n]['name'] .. '\tDEVICE: ' .. Cards[n]['playbackDevs'][j] .. ', sub device ' .. m) 224 print('\tFound playback device ' .. Cards[n].card - 1 .. ' : ' .. Cards[n]['name'] .. '\tDEVICE: ' .. Cards[n]['playbackDevs'][j] .. ', sub device ' .. m)
225-- io.flush() 225-- io.flush()
226 if 'JACK' ~= arg[1] then 226 if 'JACK' ~= cmd then
227-- print('\t\tALSA_CARD=' .. Cards[n].card - 1 .. ' ' .. speaker .. ' "Found playback device ' .. Cards[n].card - 1 .. ' : ' .. Cards[n]['name'] .. ' DEVICE: ' .. Cards[n]['playbackDevs'][j] .. ' ' .. m .. '"') 227-- print('\t\tALSA_CARD=' .. Cards[n].card - 1 .. ' ' .. speaker .. ' "Found playback device ' .. Cards[n].card - 1 .. ' : ' .. Cards[n]['name'] .. ' DEVICE: ' .. Cards[n]['playbackDevs'][j] .. ' ' .. m .. '"')
228-- io.flush() 228-- io.flush()
229 end 229 end
@@ -252,7 +252,7 @@ local speak = function(card, subdevice, device, words, printIt, forkIt)
252-- io.flush() 252-- io.flush()
253end 253end
254 254
255if 'start' == arg[1] then 255if 'start' == cmd then
256 print('Your ' .. cnt .. ' audio devices are - ') 256 print('Your ' .. cnt .. ' audio devices are - ')
257 for k,C in pairs(Cards) do 257 for k,C in pairs(Cards) do
258 for j,c in ipairs(C['playbackDevs']) do 258 for j,c in ipairs(C['playbackDevs']) do
@@ -466,7 +466,7 @@ pcm.!default {
466 ]]) 466 ]])
467 a:close() 467 a:close()
468 end 468 end
469elseif 'JACK' == arg[1] then 469elseif 'JACK' == cmd then
470 print('') 470 print('')
471 print('Start up JACK and friends.') 471 print('Start up JACK and friends.')
472 print('jack_control') 472 print('jack_control')