diff options
-rwxr-xr-x | aataaj.lua | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -81,15 +81,15 @@ NOTE - Seems both ALSA and JACK are per user. So you need to run | |||
81 | ]] | 81 | ]] |
82 | Version = '0.0 crap' | 82 | Version = '0.0 crap' |
83 | 83 | ||
84 | 84 | local cmd = '' | |
85 | local options = | 85 | local 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() |
253 | end | 253 | end |
254 | 254 | ||
255 | if 'start' == arg[1] then | 255 | if '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 |
469 | elseif 'JACK' == arg[1] then | 469 | elseif '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') |