Mercurial > hg > webaudioevaluationtool
comparison core.js @ 136:c849dcbe71aa
Merge
author | Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk> |
---|---|
date | Thu, 28 May 2015 19:27:39 +0100 |
parents | d769f1623203 93fa802a9318 |
children | 04fcd51441e5 |
comparison
equal
deleted
inserted
replaced
135:d769f1623203 | 136:c849dcbe71aa |
---|---|
527 | 527 |
528 // the audiobuffer is not designed for multi-start playback | 528 // the audiobuffer is not designed for multi-start playback |
529 // When stopeed, the buffer node is deleted and recreated with the stored buffer. | 529 // When stopeed, the buffer node is deleted and recreated with the stored buffer. |
530 this.buffer; | 530 this.buffer; |
531 | 531 |
532 this.flagAsPlayed = function() { // to be called explicitly when not in loop mode | |
533 this.played = true; | |
534 } | |
535 | |
532 this.loopStart = function() { | 536 this.loopStart = function() { |
533 this.outputGain.gain.value = 1.0; | 537 this.outputGain.gain.value = 1.0; |
534 this.metric.startListening(audioEngineContext.timer.getTestTime()); | 538 this.metric.startListening(audioEngineContext.timer.getTestTime()); |
539 this.played = true; | |
535 } | 540 } |
536 | 541 |
537 this.loopStop = function() { | 542 this.loopStop = function() { |
538 if (this.outputGain.gain.value != 0.0) { | 543 if (this.outputGain.gain.value != 0.0) { |
539 this.outputGain.gain.value = 0.0; | 544 this.outputGain.gain.value = 0.0; |
552 }; | 557 }; |
553 if (this.bufferNode.loop == false) { | 558 if (this.bufferNode.loop == false) { |
554 this.metric.startListening(audioEngineContext.timer.getTestTime()); | 559 this.metric.startListening(audioEngineContext.timer.getTestTime()); |
555 } | 560 } |
556 this.bufferNode.start(startTime); | 561 this.bufferNode.start(startTime); |
557 this.played = true; | |
558 }; | 562 }; |
559 | 563 |
560 this.stop = function() { | 564 this.stop = function() { |
561 if (this.bufferNode != undefined) | 565 if (this.bufferNode != undefined) |
562 { | 566 { |