In Pd-l2ork you can also do this:
[print(
|
[pdinfo]
Which prints all the info for the running Pd instance to the console, including devices. Or you can send it a message to get a specific attribute like
[audio-outdev, midi-outdevlist(
|
[pdinfo]
I tried it with [loadbang] and -nogui, and all the audio devices display properly. I can't test midi because I don't have any midi devices.
-Jonathan