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.
When the app runs in foreground mode the buffer size is perfect but when the app runs in background mode the buffer size change and is not a power of two.
I honestly don't know why this happens, perhaps the app priority is lowered which intermittently leads to shorter interval. If somebody knows, please let me know.
When the app runs in foreground mode the buffer size is perfect but when the app runs in background mode the buffer size change and is not a power of two.
The video with issue: https://youtu.be/Hw20iCzX8j0
In foreground:
In background:
My code is:
The repo example: https://github.com/nicobytes/audio-input-background-mode/blob/master/src/app/home/home.page.ts
I use my own normalize function because: https://github.com/edimuj/cordova-plugin-audioinput/issues/103
My environment: