[audioenc] redefine API using a struct, and allow for context in the addons