Thanks, John; Unfortunately, the code (in my case,
Apple03DBDMAAudio:i2s-a:0) doesn't change when output devices do, so
it must just be a reference to the board itself.
Regards;
Adam
Hi Adam,
You could try this, which gives you
system version of the sound device stored in your user's
Preferences/byHost folder. I don't know where this is converted to the
device name you see in System Preferences though.
---
set
myMACAddr to do
shell script "ifconfig en0 | awk
'/ether/ { gsub(\":\", \"\"); print $2
}'"
set
myPath to POSIX
path of ((path to preferences folder from user domain as
text) & "byHost:.GlobalPreferences." & myMACAddr)
do
shell script "defaults read "
& quoted form of myPath & "
com.apple.audio.CoreAudio.DefaultOutputDevice.actual"
---
You could also
investigate com.apple.audio.DeviceSettings.plist in
/Library/Preferences.