xbmc/xbmc — pull request #4402 by AlwinEsch (2014-03-12 00:20:09+00:00)
Title: Audio dsp addon handling

Attached a audio DSP processing system over add-ons.

This is my first version and not complete finished. Can you have a look over it and any ideas for things which must be improved or are wrong.

The current system in steps:
- Data is passed from CActiveAEBufferPoolResample to the DSP processing system if DSP enabled and minimum one add-on is available.
- All Add-ons are asked about the requested stream type to find available addons and modes, e.g. 5.1 Audio not need a stereo up mix.
- The system makes a list of master processing modes which are selectable from user.
- On data processing it goes over following steps:
1. Pre processing - Unmodified input stream and is send to all enabled add-ons for detection and error correction
2. Input re-sample - Re sample of the input signal for the master processing, only one add-on is allowed for it.
3. Master processing - The main processing like, surround up mix or sound modification processes. Only one from user over menu selectable mode is allowed. Add-ons can pass multiple selectable modes to XBMC.
4. Post processing - Used for any steps like, volume correction, equalizer and much more. All add-ons are called to make this.
5. Output re-sample - Re sampling of the processing signal to XBMC audio output processing.

Things for me which missing and are to-do:
- Improve add-on selection for resampling if more as one add-on can be to it
- Add audio DSP settings dialog to context menus
- Pass audio DSP information data to CGUIInfoManager
- Add build on other systems (have only Linux here)

Faults currently to fix:
- On PulseAudio the channel alignment is not correct on ALSA it is OK, have currently not the right idea for it.

![audiodsp1](https://f.cloud.github.com/assets/6879739/2392569/ed697c82-a97a-11e3-897a-accbe46ea1ae.png)
Addon position
![audiodsp2](https://f.cloud.github.com/assets/6879739/2392570/ed8131f6-a97a-11e3-876c-a9dc62a758ff.png)
The DSP enable position
![audiodsp3](https://f.cloud.github.com/assets/6879739/2392571/edaa0982-a97a-11e3-87f9-e82e99d52132.png)
The button position to select streaming DSP settings dialogue
![audiodsp4](https://f.cloud.github.com/assets/6879739/2392572/edd42604-a97a-11e3-9337-89f11155d71e.png)
The basic settings dialogue, separated in sub menus
![audiodsp5](https://f.cloud.github.com/assets/6879739/2392573/edd65276-a97a-11e3-9e18-496f9d29929c.png)
A add-on master mode settings dialogue