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.
@davilla too much code for frodo?
[AE/CA] - fix regression introduced with AE - readd the default outpu…
…t device which will ask the os for the default output device and use that
[AE/CA] - fixed - fetching the default audio output device from the o…
…s mail fail - in that case we return the last known good device id
[AE/CA] - fixed - if user has selected "default" output device we nee…
…d to reinit to it once the deviceid behind "default" changed - we do this in makestream for now (where all the reinit logic sits nevertheless)
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.h 'AudioDeviceID' does not name a type
reported on xcode 3.2.6, lion, compiling for ios debug.
thx - will be fixed in a min ...