Mercurial > hg > webaudioevaluationtool
comparison js/core.js @ 3054:aa1ceca04519
Merge branch 'master' into vnext
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 31 Oct 2017 09:58:15 +0000 |
parents | 1b28c30b8c20 7d1a34b5a4d2 |
children | 95af70fef794 824c8539fd02 |
comparison
equal
deleted
inserted
replaced
3052:1b28c30b8c20 | 3054:aa1ceca04519 |
---|---|
3023 volume.slider.min = -60; | 3023 volume.slider.min = -60; |
3024 volume.slider.max = 12; | 3024 volume.slider.max = 12; |
3025 volume.slider.value = 0; | 3025 volume.slider.value = 0; |
3026 volume.slider.step = 1; | 3026 volume.slider.step = 1; |
3027 volume.handleEvent = function (event) { | 3027 volume.handleEvent = function (event) { |
3028 if (event.type == "mousemove") { | 3028 if (event.type == "mousemove" || event.type == "mouseup") { |
3029 this.valueDB = Number(this.slider.value); | 3029 this.valueDB = Number(this.slider.value); |
3030 this.valueLin = decibelToLinear(this.valueDB); | 3030 this.valueLin = decibelToLinear(this.valueDB); |
3031 this.valueText.textContent = this.valueDB + 'dB'; | 3031 this.valueText.textContent = this.valueDB + 'dB'; |
3032 audioEngineContext.outputGain.gain.value = this.valueLin; | 3032 audioEngineContext.outputGain.gain.value = this.valueLin; |
3033 } else if (event.type == "mouseup") { | 3033 } |
3034 if (event.type == "mouseup") { | |
3034 this.onmouseup(); | 3035 this.onmouseup(); |
3035 } | 3036 } |
3036 this.slider.value = this.valueDB; | 3037 this.slider.value = this.valueDB; |
3037 | 3038 |
3038 if (event.stopPropagation) { | 3039 if (event.stopPropagation) { |