https://github.com/chirlu/sox/pull/6
When I upgraded from Mojave to Monterey, I could no longer specify a particular audio device using the device enumeration hack:
sox -V6 -n -t coreaudio bogus
(They ALL listed my HDMI monitor, not "External Headphones", etc.)
Anyway, I tracked it down to a simple fix: resetting property_size = sizeof(name)