Some months ago, with Android ICS (4.0), I developed an android kernel module which intercepted the "pcmC0D0p"-module to fetch all system audio.
My target is to stream ALL audio (or at least the played music) to a remote speaker via AirPlay.
The kernel module worked, but there where several problems (kernel-versions, root-privileges etc.) so I stopped working on this.
Now, we have Android 4.1 and 4.2 and I have new hope!
Who has an idea how to capture the audio in Android?
I had following ideas:
Connect via bluetooth to the same phone, set routing to BT and grab the audio on the "other end": this shouldn't work
Intercept the audio with a kernel module like done before: hardcore, get it worked but not applicable
JACK Audio Connection Kit: sadly Android uses "tinyALSA" and not "ALSA". TinyALSA does NOT support any filters like JACK (but this brought the idea with the kernel module)
Use PulseAudio as a replacement for AudioFlinger, but this is also not applicable
EDIT (forgot them):
I compiled "tinymix" (baby-version of ALSA-mixer) from tinyALSA (the ALSA on Android) and tried to route the audio-out to mic-in - but with no success (not understandable for me). And this also needs rooting: not applicable
I tested OpenSL ES, but I'm not a C-crack and it ended in "I can record microphone, but no more" (maybe I was wrong?)
<