implement OpenSL ES audio driver backend for android
Audio output from MuseScore desktop app in Android incurs quite a bit of overhead, at least for the two cases I've tried:
- if using a VNC, the audio first gets rendered inside musescore to ALSA, but then has to go through vnc network packets through loopback interface, possibly compressed/decompressed, and then in the VNC app is sent to android audio system.
- if using XSDL X-sever, which comes with a PulseAudio server, then before executing musescore you first set an environment variable to specify the PulseAudio server as the localhost ip address pluse some port number. But similarly, the audio still has to be sent over network packets through loopback and the XSDL android pulse audio server still has to unpack those packets and send to android audio system. Seems to produce very choopy audio, which can be compensated by lowering bitrate.
So it seems would be much more direct to add another audio backend for OpenSL ES in musescore, just like mscore/alsa.h, mscore/pulseaudio.h, or mscore/jackaudio.h, which would extend the Driver class, so that musescore can speak directly to the android audio system. Documentaiton on how to use the C++ bindings via native development kit are here: http://developer.android.com/ndk/guides/audio/index.html
Also probably in order to get this working, might have to not use a chroot, and rather put every single library dependency in the AppImage. That's a separate issue, which might require compiling with android's NDK toolkit, and possibly maybe even have to use libbionic instead of standard linux libc. (I might have to test this out with a simpler program before trying musescore.)