From 3841428eebaa4b5e9f30b35501802e5c1664b5ef Mon Sep 17 00:00:00 2001 From: dvs1 Date: Mon, 28 Oct 2024 23:31:54 +1000 Subject: More clean ups. --- aataaj.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aataaj.lua b/aataaj.lua index d48ec94..e044ed1 100755 --- a/aataaj.lua +++ b/aataaj.lua @@ -182,7 +182,7 @@ for i,C in pairs(Cards) do end print('Your ' .. cnt .. ' audio devices are ') -for i,C in pairs(Cards) do +for k,C in pairs(Cards) do print('' .. C.card - 1 .. ' : ' .. C.name) __('ALSA_CARD=' .. C.card - 1 .. ' ' .. speaker .. ' "Your ' .. cnt .. ' audio devices are "'):log():noErr():noOut():fork() end @@ -190,7 +190,7 @@ end __'sleep 6':Do() print('') io.flush() -for i,C in pairs(Cards) do +for k,C in pairs(Cards) do print('' .. C.card - 1 .. ' : ' .. C.name) __('echo "' .. C.card - 1 .. ' : ' .. C.name .. '"') __('ALSA_CARD=' .. C.card - 1 .. ' ' .. speaker .. ' "Device ' .. C.card - 1 .. ' ' .. C.name .. '"'):log():noErr():noOut():Do() @@ -204,7 +204,7 @@ io.flush() if 'start' == arg[1] then __('mkdir -p ' .. options.asoundrcPath.value):Do() local a, e = io.open(options.asoundrcPath.value .. '/jack-plumbing', 'w') - if nil == a then print('Could not open ' .. options.asoundrcPath.value .. '/jack-plumbing') else + if nil == a then print('Could not open ' .. options.asoundrcPath.value .. '/jack-plumbing - ' .. e) else a:write([[ (connect "system:capture_1" "ploop:playback_1") (connect "system:capture_2" "ploop:playback_2") @@ -410,7 +410,7 @@ elseif 'JACK' == arg[1] then if _.runnable'zita-j2a' then AOUT = 'zita-j2a' end print('Basic ALSA sound devices converted to JACK.') - for i,C in pairs(options.aliases.value) do + for k,C in pairs(options.aliases.value) do print('HW playback: ' .. C['name'] .. '\tDEVICE: ' .. C['dev']) __(AOUT .. ' -j ' .. C['name'] .. ' -d ' .. C['dev']):fork() end @@ -430,7 +430,7 @@ elseif 'JACK' == arg[1] then print('') print('Rest of ALSA sound devices converted to JACK.') - for i,C in pairs(Cards) do + for k,C in pairs(Cards) do for j,c in ipairs(C['playbackDevs']) do print('HW playback: ' .. C['name'] .. '\tDEVICE: ' .. C['playbackDevs'][j]) __(AOUT .. ' -j ' .. C['name'] .. '_' .. C['playbackDevs'][j] .. '-in -d ' .. C['name'] .. C['playbackDevs'][j]):fork() -- cgit v1.1