BackgroundMusic/SharedSource
Kyle Neideck 4c0c656538
Store the preferred devices list in User Defaults.
BGMApp has to set BGMDevice, and often also the Null Device for a short
time, as the systemwide default audio device, which makes CoreAudio put
them in the preferred devices list in its Plist file. And since the list
is limited to three devices, it only gives us one or two usable ones.
Ideally, CoreAudio just wouldn't add our devices to its list, but I
don't think we can prevent that.

As a partial workaround, we now store our own copy of the preferred
devices list without our devices, which BGMApp can use to figure out
which devices were pushed out of CoreAudio's list by our devices.

This doesn't fix the problem entirely because our devices still take up
room in CoreAudio's list when BGMApp is closed, but I think that would
be harder to solve.

See #167.

Also:
 - Handle setting the initial output device in BGMPreferredOutputDevices
   instead of BGMAudioDeviceManager.
 - Fix a crash in BGMOutputVolumeMenuItem::dealloc caused by using
   dispatch_sync to dispatch to the main queue while running on the main
   queue.
 - Fix a crash in BGMPreferredOutputDevices if
   /Library/Preferences/Audio/com.apple.audio.SystemSettings.plist
   doesn't exist.
 - Add Swinsian to the list of music players in the README. (I must have
   forgotten to do that when I added support for it.)
2018-10-28 17:08:47 +11:00
..
BGM_TestUtils.h Add an XPC helper. Sync BGMApp and BGMDriver with it while starting IO. 2016-03-31 11:42:24 +11:00
BGM_Types.h Add a volume slider for system sounds. 2017-12-26 23:10:57 +11:00
BGM_Utils.cpp Set the OS default audio device back if BGMApp exits abnormally. 2017-10-23 20:19:42 +11:00
BGM_Utils.h Store the preferred devices list in User Defaults. 2018-10-28 17:08:47 +11:00
BGMXPCProtocols.h Set the OS default audio device back if BGMApp exits abnormally. 2017-10-23 20:19:42 +11:00