libaudio refactoring.

Signed-off-by: Rob Caelers <robc@krandor.org>