This audio port selector uses almost the same algorithm to build the audio port popup menus as it is done in the preferences pane. It supports adding and removal of devices and you can select which selector (input and/or output) is visible.
I did not add the audio port icons as it is done in the preferences pane since the width of the field is i.m.o. too small.
The first version is buid for Gnome 4.2. Just edit the version list in file ".local/share/gnome-shell/extensions/audio-selector@harald65.simon.gmail.com/metadata.json" if you want to use the shell for a different version.