Under OSX programmatically control the master volume as well as register the volume change notification.