cleaned up audio api code