edimuj / cordova-plugin-audioinput

This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
https://github.com/edimuj/app-audioinput-demo
MIT License
161 stars 88 forks source link

[Android 7] audioinput event not firing #40

Closed 1N50MN14 closed 7 years ago

1N50MN14 commented 7 years ago

Hei @edimuj - first thanks for the awesome project! ;)

For some odd reason the audioinput event is not firing on Android 7.0, my configuration is basic:

var audioCaptureCfg = {
        sampleRate: audioinput.SAMPLERATE.CD_AUDIO_44100Hz,
        bufferSize: 16384,
        channels: audioinput.CHANNELS.MONO,
        format: audioinput.FORMAT.PCM_16BIT,
        normalize: true,
        normalizationFactor: 32767.0,
        concatenateMaxChunks: 10,
        audioSourceType: audioinput.AUDIOSOURCE_TYPE.DEFAULT
    };

I'm pretty much following the file-demo.js example, which is pretty straight forward, no errors are being thrown either.(window.audioinput && !audioinput.isCapturing())is not falsy and start() gets executed.

Any tips on what might be causing the issue or how to debug it on my side?

Thanks

edimuj commented 7 years ago

Hi, @1N50MN14 ! Sorry to hear that. I just built and tested the plugin on a Nexus 5X with Android 7.1.2, and it seems to work correctly here at least.

With that said, it is sadly a real pain to debug stuff like this :( but it would help if I could take a look at your test app since even minimal changes can lead to errors. It would be even better if I could clone your test app, and build/run it (from a project here on GitHub).

edimuj commented 7 years ago

Doing some housekeeping: Since there hasn't been any action regarding this issue for a time now, I'm closing it.