Mercurial > hg > webaudioevaluationtool
comparison core.js @ 852:36a0054a0ee0
Ape for Firefox fixed
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Mon, 14 Sep 2015 09:23:49 +0100 |
parents | 1eacf6c1056a |
children | be9e15805532 |
comparison
equal
deleted
inserted
replaced
851:b797a8b347d0 | 852:36a0054a0ee0 |
---|---|
916 this.bufferNode = audioContext.createBufferSource(); | 916 this.bufferNode = audioContext.createBufferSource(); |
917 this.bufferNode.owner = this; | 917 this.bufferNode.owner = this; |
918 this.bufferNode.connect(this.outputGain); | 918 this.bufferNode.connect(this.outputGain); |
919 this.bufferNode.buffer = this.buffer; | 919 this.bufferNode.buffer = this.buffer; |
920 this.bufferNode.loop = audioEngineContext.loopPlayback; | 920 this.bufferNode.loop = audioEngineContext.loopPlayback; |
921 this.bufferNode.onended = function() { | 921 this.bufferNode.onended = function(event) { |
922 // Safari does not like using 'this' to reference the calling object! | 922 // Safari does not like using 'this' to reference the calling object! |
923 event.srcElement.owner.metric.stopListening(audioEngineContext.timer.getTestTime(),event.srcElement.owner.getCurrentPosition()); | 923 event.currentTarget.owner.metric.stopListening(audioEngineContext.timer.getTestTime(),event.currentTarget.owner.getCurrentPosition()); |
924 }; | 924 }; |
925 if (this.bufferNode.loop == false) { | 925 if (this.bufferNode.loop == false) { |
926 this.metric.startListening(audioEngineContext.timer.getTestTime()); | 926 this.metric.startListening(audioEngineContext.timer.getTestTime()); |
927 } | 927 } |
928 this.bufferNode.start(startTime); | 928 this.bufferNode.start(startTime); |