move audio code to audio engine