Fixed changes in Web Audio API

Some code was deprecated in a newer version of the Web Audio API. This code corrects it.