I feel like I’m missing something very basic here, I want to get the number of (hardware) channels available from my soundcard, before booting the server.
The device list in the language (ServerOptions.devices) unfortunately doesn’t return the number of channels.
It’s misleading because every object in SC has a numChannels, which is assumed to be 1 unless overridden somewhere.
String.findRespondingMethodFor(\numChannels)
-> Object:numChannels
// which is implemented as
numChannels { ^1 }
The server-side code to read the audio device list is different from the language-side code.
It would be a good feature request, to have ServerOptions.devices give back objects with device properties, rather than just strings (but this would break existing user code).
The only workaround I can think of is to run scsynth in unixCmdGetStdOut and parse the text result.