cordova-plugin-audioinput icon indicating copy to clipboard operation
cordova-plugin-audioinput copied to clipboard

streamToWebAudio working with iOS 12.4 ?

Open fquirin opened this issue 5 years ago • 6 comments

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?

fquirin avatar Sep 13 '19 14:09 fquirin

I have exactly the same issue with 12.4 everything is 0. And no Audio is being played back.

bigxd123 avatar Sep 13 '19 17:09 bigxd123

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

bigxd123 avatar Sep 13 '19 21:09 bigxd123

Thanks for letting me know. It seems to have to do with a PR that introduced at typed array in v1.0.2

edimuj avatar Sep 20 '19 14:09 edimuj

image

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.

suzhengda avatar Apr 04 '20 09:04 suzhengda

+1

nth-chile avatar Jul 12 '20 09:07 nth-chile

+1 buffer array is al 0

shaibrown5 avatar Feb 23 '22 12:02 shaibrown5