> The cardname is then part of the $OUTPUT variable, e.g. > "hw:CARD=DragonFly,DEV=0", from which 'DragonFly' would need to be > extracted. >
I can make that be the default, but I'll allow overriding it on the command line. > 2) Do you have any thoughts on the frequency that this script checks for > the DAC? You've currently set 4 seconds, but how much of a drain on > resources would it cause if that was, say, 1 second? Maybe make this a > command line argument? > Anything would work. I can make it 1 second. I confess it makes me twitch a little, but 1 second is eons in modern computer clock speed time. > 3) If you put the log file in /var/log/, and precede its name with > 'pcp_', it will show up in the pCP -> Diagnostics -> Logs page, so users > won't have to use a separate shell to see what's going on. It needs root > permissions to write to this folder, but I think that's OK because User > Commands are run as root. > Okay. Didn't know about that. Can do. > 4) For my own setup I prefer that Squeezelite is soft powered on when > the DAC is turned on, regardless of its previous soft power state, so > I've been learning about the necessary JSON commands to do that this > evening. So for my own copy I'm going to add a function to do that and > add it to the commands that are run when the device appears. > You go guy! I have no idea what you're talking about. :-) > 5) There's at least one user of the udev script who does not want > Squeezelite to be killed when the DAC is powered off. I added the > --nostop option so that the 'remove' udev rule was omitted in the > installation. I wonder if a --nostop command line option could be added > to your script to achieve the same result. > I'm not sure what a --nostop would do. All I call is "restart" now, not "stop". If they don't want "restart" either, then... why would they run this script? The only thing that happens right now when unplugging the device is a log message. > Whilst I'll be happy to do these modifications for myself, I'm more than > keen to see how an experienced programmer would make them . I > learn a little bit more every time I look at someone else's code. > Don't worry -- my sense of ownership will fade very quickly, and I'll be happy to let you take over. ;-) ------------------------------------------------------------------------ pgf's Profile: http://forums.slimdevices.com/member.php?userid=58510 View this thread: http://forums.slimdevices.com/showthread.php?t=113661 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
