xbmc/xbmc — pull request #2097 by Memphiz (2013-01-21 21:46:08+00:00)
Title: [AE/CA] - fix regression - re-add the default audio device

Since AE merge users are missing the ability to select "default" as audio device in osx. This uses the default device set by osx.

The first commit readds this feature and works already. Though i saw that osx sometimes doesn't return a valid audiodeviceid (but returns NOERR) - in that case the 2nd commit returns the last good known id.

Since we optimized the reinit (only reinit if something changed) we need the 3rd commit. If user selected "default" we check if the deviceid for the default device has changed in makestream (i added a todo comment for a future solution by os notifications).

All 3 commits restore the behaviour of Eden. As an example my test user plugs in a bluetooth headset during XBMC runtime. Now he just needs to start a movie (makestream gets called) for getting xbmc use it - since osx selects the headset as default output on plug&play.

I have verified that behaviour by utilising AirFoil which also adds a device during runtime.

Thx to TripKip for spending his evening for helping me testing and debugging this out.

@huceke comments?
@davilla too much code for frodo?