diff options
Diffstat (limited to 'aataaj.lua')
-rwxr-xr-x | aataaj.lua | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -143,8 +143,7 @@ local options = | |||
143 | ['--help'] = {help}, | 143 | ['--help'] = {help}, |
144 | } | 144 | } |
145 | 145 | ||
146 | local 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('') | |||
221 | io.flush() | 220 | io.flush() |
222 | 221 | ||
223 | 222 | ||
224 | if 'start' == args[1] then | 223 | if '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 |
394 | elseif 'JACK' == args[1] then | 393 | elseif '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") |