xbmc/xbmc — pull request #1522 by hydra (2012-10-02 12:01:06+00:00)
Title: Prevent crash when audio does not initialise correctly.

If a crash happens during a RenderManager callback the audio system is not cleaned up and next time xbmc starts it crashes without this change.

Looking at the possible failure scenarios of the audio system initialisation it's quite possible that other failures are not being handled correctly in the 'failed' block.

Suggest splitting the function up into a bunch of other smaller functions.