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

Ionic + iOs 13.1.3

Open aschwersenz opened this issue 5 years ago • 3 comments

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!

aschwersenz avatar Nov 23 '19 21:11 aschwersenz

+1

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

Same here, I had to go back to 1.0.1

numerized avatar Aug 31 '20 17:08 numerized

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

ipostu avatar Nov 09 '22 08:11 ipostu