moving audio API logic to media model