cordova-plugin-audioinput
cordova-plugin-audioinput copied to clipboard
Ionic + iOs 13.1.3
Hi,
I am trying to do a frequency analysis of the current microphone input using your plugin and ionic. My code looks like this
const audioContext = new webkitAudioContext();
audioinput.start({
audioContext: audioContext,
streamToWebAudio: true
});
const analyser = audioContext.createAnalyser();
audioinput.connect(analyser);
const bufferLength = analyser.frequencyBinCount;
let dataArray = new Uint8Array(bufferLength);
for (let i = 0; i < 100; i++) {
analyser.getByteFrequencyData(dataArray);
console.log(dataArray);
}
But the array always just contains 0. I read somewhere that there is a bug with 1.0.2, so I reverted to 1.0.1 but to no avail. Any ideas what I am doing wrong?
Thanks!
+1
Same here, I had to go back to 1.0.1
I had a similar issue related to this, the problem in my case was that I was also using getUserMedia to get microphone data and presumably there was a race condition for the same hardware resource