Automatically register plugins when creating a database.
Various audio bug fixes.