webaudio refactoring