I had been having this issue for a long time now, and according to this ticket(https://bugs.webkit.org/show_bug.cgi?id=154538) the issue was solved already - but I still was getting it until today.
I tried everything in this thread but none of the solutions mentioned worked for me.
I was still getting the audio distorted when I switched my app from sounding on headphones to my phone's speakers.
However, I have found a plugin that does the trick:
Just add "cordova-plugin-playfrequency" to your build and the issue with the distortion should gone,
Full plugin info here:
https://www.versioneye.com/nodejs/cordo ... ency/0.0.1
Tested using an iPhone 6S with iOS 10 Beta 8 / built with intel xdk / and made with C2 V234
I hope this post help,
BR
Jonathan