fixed deprecation issues with AudioParam for WebAudioSoundManager

This commit is contained in:
Pavle Goloskokovic 2017-11-21 19:47:43 +01:00
parent 1f32f04036
commit cd43f0095c

View file

@ -95,7 +95,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', {
return this.masterMuteNode.gain.value === 0; return this.masterMuteNode.gain.value === 0;
}, },
set: function (value) { set: function (value) {
this.masterMuteNode.gain.value = value ? 0 : 1; this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0);
} }
}); });
/** /**
@ -107,7 +107,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', {
return this.masterVolumeNode.gain.value; return this.masterVolumeNode.gain.value;
}, },
set: function (value) { set: function (value) {
this.masterVolumeNode.gain.value = value; this.masterVolumeNode.gain.setValueAtTime(value, 0);
} }
}); });
/** /**