scratch-audio
Advanced tools
Comparing version 0.1.0-prerelease.1515596313 to 0.1.0-prerelease.1516198804
{ | ||
"name": "scratch-audio", | ||
"version": "0.1.0-prerelease.1515596313", | ||
"version": "0.1.0-prerelease.1516198804", | ||
"description": "audio engine for scratch 3.0", | ||
@@ -25,3 +25,3 @@ "main": "dist.js", | ||
"audio-context": "1.0.1", | ||
"babel-core": "^6.24.1", | ||
"babel-core": "6.26.0", | ||
"babel-eslint": "^7.2.2", | ||
@@ -36,5 +36,5 @@ "babel-loader": "^6.4.1", | ||
"startaudiocontext": "1.2.1", | ||
"travis-after-all": "^1.4.4", | ||
"travis-after-all": "1.4.5", | ||
"webpack": "2.4.0" | ||
} | ||
} |
@@ -274,2 +274,3 @@ const StartAudioContext = require('startaudiocontext'); | ||
navigator.mediaDevices.getUserMedia({audio: true}).then(stream => { | ||
this.audioStream = stream; | ||
this.mic = this.audioContext.createMediaStreamSource(stream); | ||
@@ -286,3 +287,3 @@ this.analyser = this.audioContext.createAnalyser(); | ||
// If the microphone is set up and active, measure the loudness | ||
if (this.mic && this.mic.mediaStream.active) { | ||
if (this.mic && this.audioStream.active) { | ||
this.analyser.getFloatTimeDomainData(this.micDataArray); | ||
@@ -289,0 +290,0 @@ let sum = 0; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
489379
2490
46