Closed mattbierner closed 8 years ago
Thanks for your interest in Wad.js! However, something doesn't seem quite right in this code that you changed. When I load up your fork in the GUI application (in the GUI folder), I'm unable to get microphone access. There's an error in the console: wad.js:2530 Error setting up microphone input: TypeError: Illegal invocation
It's possible that I'm having problems because the function navigatorGetUserMedia
is no longer a property of the navigator object. In past versions of Wad.js, I used Function.prototype.bind
to avoid assigning to the window or navigator, while still retaining the link between navigator and getUserMedia.
Thanks for taking a look. There were two problems with the this
binding that should be fixed now, although I wasn't able to get the GUI example app to do much more than produce some horrible shrieking sound, even on the master branch.
Let me know if there are any instructions for testing.
That horrible shrieking sound was probably just microphone feedback (sound goes in your mic, out your speakers, and right back into your mic, which causes the audio signal to amplify rapidly). If you use headphones, or an external microphone, you probably won't get such bad feedback.
There aren't really any instructions for testing, but there should be. I usually just load up the GUI app and make some quick loops, making sure that microphone and MIDI access work.
Thanks for contributing!
Fixes two issues when using this library with webpack and react:
midiMap
is being used as a global. Fix by just making it a varwindow
object, which is breaking react for some reason. The fix was to not set values onwindow
, but I also just simplified and reformatted up that part of the code