cordova-plugin-audioinput
cordova-plugin-audioinput copied to clipboard
streamToWebAudio working with iOS 12.4 ?
Hi,
I'm currently trying to build my app for iOS 12.4 with the latest Xcode and one of the issues is that I'm not getting any data anymore from the audioinput plugin when using streamToWebAudio: true
. When used with a script-processor the 'onaudioprocess' event is triggered but the buffer values are all 0 :-(
I've also tried the included webaudio-demo but don't get any output there as well.
Can someone confirm that this is still working?
I have exactly the same issue with 12.4 everything is 0. And no Audio is being played back.
After searching around a bit, downgrading to 1.0.1 from 1.0.2 fixed the issues like mentioned in this post https://github.com/edimuj/cordova-plugin-audioinput/issues/96
Thanks for letting me know. It seems to have to do with a PR that introduced at typed array in v1.0.2
in audioInputCapture.js the line is wrong: oncatenatedData.concat(audioinput._dequeueAudioData())
it cause webAudio get all zero Array. Float32Array can't concat by concat method.
in ios. capture microphone it return 16-bit pcm. is it really right i show the code below here in audioInputCapture.js.
var out = Float32Array.from(pcmData, function(i) { return parseFloat(i) / audioinput._cfg.normalizationFactor; });
webAudio need a normalization Float32Array data. 16-bit should transform 32bit data. otherwise the sound on ios is noise.
i don't know if I was wrong. my english is poor forgive me.
+1
+1 buffer array is al 0