Mercurial > hg > webaudioevaluationtool
comparison core.js @ 836:1640c08ae2e8
Feature #1246: Playhead starts from 0 when test stopped and restarted for synchronous loop tests.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 02 Dec 2015 11:26:45 +0000 |
parents | 84db2932ef02 |
children | 31d02b334ba8 |
comparison
equal
deleted
inserted
replaced
835:84db2932ef02 | 836:1640c08ae2e8 |
---|---|
966 this.getCurrentPosition = function() { | 966 this.getCurrentPosition = function() { |
967 var time = audioEngineContext.timer.getTestTime(); | 967 var time = audioEngineContext.timer.getTestTime(); |
968 if (this.bufferNode != undefined) { | 968 if (this.bufferNode != undefined) { |
969 if (this.bufferNode.loop == true) { | 969 if (this.bufferNode.loop == true) { |
970 if (audioEngineContext.status == 1) { | 970 if (audioEngineContext.status == 1) { |
971 return time%this.buffer.duration; | 971 return (time-this.metric.listenStart)%this.buffer.duration; |
972 } else { | 972 } else { |
973 return 0; | 973 return 0; |
974 } | 974 } |
975 } else { | 975 } else { |
976 if (this.metric.listenHold) { | 976 if (this.metric.listenHold) { |