exokitxr / exokit

Native VR/AR/XR engine for JavaScript 🦖
MIT License
997 stars 117 forks source link

Microphone crash #1324

Open shawwn opened 5 years ago

shawwn commented 5 years ago

To Reproduce Create examples/microphone2.html:

<html>
<head>
<script>
  var handleSuccess = function(stream) {
    var context = new AudioContext();
    console.log('1');
    var source = context.createMediaStreamSource(stream);
    console.log('2');
    var processor = context.createScriptProcessor(1024, 1, 1);
    console.log('3');

    source.connect(processor);
    console.log('4');
    processor.connect(context.destination);
    console.log('5');

    processor.onaudioprocess = function(e) {
      console.log('6');
      // Do something with the data, i.e Convert this to WAV
      console.log(e.inputBuffer);
      console.log('7');
    };
  };

  navigator.mediaDevices.getUserMedia({ audio: true, video: false })
      .then(handleSuccess);
</script>
</head>
<body>
</body>
</html>

then run it:

$ node . examples/microphone2.html 
1
2
3
4
5
Segmentation fault: 11

Additional context Add any other context about the problem here.

System information:

Screenshots If applicable, add screenshots to help explain your problem.

shawwn commented 5 years ago

backtrace image