disable wall detune for now, web audio slows down playback rate with detune, need pitch shifter

This commit is contained in:
Kevin Ngo
2018-10-26 00:00:54 -07:00
parent 940b783c6b
commit 2b8dee29ef

View File

@@ -183,13 +183,13 @@ AFRAME.registerComponent('song', {
onWallHitStart: function () {
const gain = this.audioAnalyser.gainNode.gain;
gain.linearRampToValueAtTime(0.2, this.context.currentTime + 0.1);
this.source.detune.linearRampToValueAtTime(-1200, this.context.currentTime + 0.1);
// this.source.detune.linearRampToValueAtTime(-1200, this.context.currentTime + 0.1);
},
onWallHitEnd: function () {
const gain = this.audioAnalyser.gainNode.gain;
gain.linearRampToValueAtTime(BASE_VOLUME, this.context.currentTime + 0.2);
this.source.detune.linearRampToValueAtTime(0, this.context.currentTime + 0.2);
// this.source.detune.linearRampToValueAtTime(0, this.context.currentTime + 0.2);
},
startAudio: function () {