I was having issues with getting my Web Audio effects in KameSame loud enough to be audible when an iOS device was simultaneously playing music in the background. Because I like to listen to music while I study, here's how I increased the volume of the sound effect relative to the music in iOS.
Here's the original function in my app for playing audio in iOS (all other platforms work fine with new window.Audio(url).play()
):
function playIos (url) {
const audioContext = new AudioContext()
const source = audioContext.createBufferSource()
const request = new window.XMLHttpRequest()
request.open('GET', url, true)