audioProfile.js: simplify code