open waveaudio alias wave shareable wait
The following command returns the alias name of the connected device ("ampmix").
connection wave query type wave stream alias ampmix wait