Add compatibility to old libmedia Audio api

(cherry picked from commit 40f9329c7e430669470e9f43066b0c54b4910af6)