xbmc/xbmc — pull request #2152 by fritsch (2013-01-31 20:53:53+00:00)
Title: AE: make forced enumeration possible

This can be used to delay startup in favor of waiting for Audio Devices. It changes the interface of AudioEngine.

I am not sure what is planned for the future, but in order to get things fixed for:
- suspend / resume (empty the devices list and just call Enumerate with force)
- Devices hotplug (same, add/merge policy possible)
- ...

We need a way to delete the internal m_sinks List and reload the devices via the underlying API (be it alsa, pulse, whatever).

This change however is minimal and makes devices appearing during startup - but I needed an additional flag to indicate alsa, that it should update their internal alsa devices list. As there is only the way of communication via the Factory, I introduced the additional "force" flag.

Discussion welcome

One sidenote, this change would have worked without any interface change - but the coding style #define stuff within the factory ... needs this :-(

Additional Sidenote: Those #defines to call methods make it unbelievable hard to "find" the actual position where to work / tune, cause this even disturbs the debugger.