It now works pretty well under Linux. However it will only work in multi-threading mode.
Still to do:
Test it under OSX
The pipeline is slow to restart on pause/play (an easy but hacky fix would be not to pause/play and just start sending empty buffers when the pipeline is paused).
Re-implement AudioOutput with GStreamer.