comparison core.js @ 1522:40face84bd13

Ape for Firefox fixed
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Mon, 14 Sep 2015 09:23:49 +0100
parents 349e0572ca2c
children be9e15805532
comparison
equal deleted inserted replaced
1521:dfbe08826f64 1522:40face84bd13
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);