Inter-app audio

551 views
Skip to first unread message

Flavio

unread,
May 21, 2019, 12:39:20 PM5/21/19
to android-ndk

Hi all,


sorry if this is slightly off-topic, however many Android audio developers post to this group so I thought it might be relevant. I’ve also posted this to the Android-MIDI group.


We're pleased to announce that we have open-sourced the Audioroute, the open source SDK that allows apps to exchange audio and MIDI on Android.

In short it allows to use synth and effects apps as plugins.


The Audioroute SDK Github page now includes the full source code for the SDK library and for the sample AudiorouteHost app, which allows hosting Audioroute compatible synth and effects apps, including the SimpleSynth and DelayEffect sample apps.

There's also a tutorial video that shows how to add support for Audioroute to a synth or effect app in 30 minutes.


If you're a developer of an audio or music app, jump in and add Audioroute to your app, users will be able to find and use your app from Audioroute compatible hosts.


We believe that Audioroute could greatly improve the possibilities of users of audio and music apps on Android by allowing them to use multiple apps together. This would likely result in an overall growth of the audio-music market on Android.


Let's get our apps connected!


Any comment would be welcome.


Cheers, Flavio.


Glenn Kasten

unread,
May 22, 2019, 11:38:49 AM5/22/19
to android-ndk
Flavio, thank you for sharing this.  It looks really interesting!
I'm curious whether you're familiar with other historical and current solutions
such as Patchfield (Android), and Audiobus, AudioKit, Inter-App (iOS)?
If so, how does your approach compare to these other solutions,
and how was it influenced (what did you learn from them)?

I assume that your solution doesn't need any modifications
to the Android platform. If you could have modifications to the platform,
what changes to Android OS might enable your solution to be better
(more performant, more features, better integration, etc.)?

Thanks,
Glenn

Flavio Antonioli

unread,
May 22, 2019, 1:20:18 PM5/22/19
to andro...@googlegroups.com
Hi Glenn,

Audioroute is loosely based on Patchfield, i.e. we started experimenting with it but then we rewrote most of the code. 
It's kind of like iOS Inter-app audio, it doesn't require the user to install an app to control the routing like Audiobus and Patchfield. Audioroute is the transport mechanism, something like Audiobus could be built on top of it as a regular app (we include a simple Audiobus-like host app in the sample code). The main thing for us would be to have developers make synths and effects available as Audioroute, so that users of n-Track or other DAWs would no longer be limited by what's inside of the DAW, they could use external stuff. That could make a big difference, and possibly make many effect-only apps appear, something that's almost non-existent now.
Audioroute supports multiple instances of each hosted module, i.e. you could have two independent instances of a reverb effect on two tracks. This is implemented by passing an instance id to the callback, so the hosted app must have explicit support for multiple instances. We thought that for existing apps this may not be a trivial refactoring, so we made supporting multiple instances an optional feature, a developer can enable or disable it in the module metadata.

So far we tested on a small number of devices and the performance seems to be quite good, so I'm not sure if there's a need for support from the OS for this.
If I had to pick something to improve in the OS... dangerous question! :) 
I guess the main thing would be performance, if audio latency could be low reliably across devices Audioroute and the whole music app ecosystem would benefit. Latency still seems to be an issue even on Android 9 on many devices. And maybe something in the cpu governor that took account of audio, i.e. if there are dropouts or if the audio callbacks length is near the audio buffer cycle time it should pump the cpu clock up to sustain the streaming under high load (I've seen huge differences in this between devices).

Cheers,
Flavio.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5a12517b-8b2d-47f8-83b7-89d30528c7e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Best regards,
Flavio Antonioli.
_______________________
n-Track Audio Software
www.ntrack.com

Follow n-Track on Facebook:
www.facebook.com/ntrack
_______________________

Alejandro Hernández Cruz

unread,
Jun 11, 2019, 9:05:12 AM6/11/19
to android-ndk
Very interesting technology! Seems like a very good solution for inter-app audio. Will keep an eye open on this, hopefully many apps start implementing support for Audioroute, the whole ecosystem would benefit.
Reply all
Reply to author
Forward
0 new messages