From cc28eb3cf2438413a6b7bb3b270e2963245c409e Mon Sep 17 00:00:00 2001 From: dvs1 Date: Mon, 4 Nov 2024 18:24:33 +1000 Subject: Another failure at boot subdevices. Works in terminal, dammit. --- aataaj.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'aataaj.lua') diff --git a/aataaj.lua b/aataaj.lua index 371adbb..7e6c762 100755 --- a/aataaj.lua +++ b/aataaj.lua @@ -177,16 +177,19 @@ io.flush() local speak = function(card, subdevice, device, words, printIt, forkIt) --- local file = os.tmpname() --- D('Creating temporary script file at ' .. file) - local s = '#!/bin/bash\necho "' .. words .. '" | ALSA_CARD=' .. device .. ' ' .. speaker --- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -d ' .. device --- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -w ' .. file .. ' ; aplay -q --device=hw:CARD=' .. card .. ',DEV=' .. subdevice .. ' ' .. file + local file = os.tmpname() .. '.wav' + D('Creating temporary script file at ' .. file) +-- local s = '#!/bin/bash\necho "' .. words .. '" | ALSA_CARD=' .. device .. ' ' .. speaker +-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -d hw:' .. device .. ',' .. subdevice + local s = '#!/bin/bash\n' .. speaker .. ' -d hw:' .. device .. ',' .. subdevice .. ' "' .. words .. '"' +-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -w ' .. file .. ' ; aplay --device=hw:' .. device .. ',' .. subdevice .. ' ' .. file +-- local s = '#!/bin/bash\n' .. speaker .. ' -w ' .. file .. ' "' .. words .. '" ; aplay --device=hw:' .. device .. ',' .. subdevice .. ' ' .. file +print(s) if printIt then print(words) end if forkIt then - __(s):noErr():noOut():fork() + __(s):fork() else - __(s):noErr():noOut():Do() + __(s):Do() end -- io.flush() end -- cgit v1.1