yes ◦ Every app potentially features audio: games, calls, alerts, ... ◦ The Android platform itself features it a lot too • music and audio apps - still, kind of yes ◦ iTunes, Spotify, YouTube, TikTok, etc. • creative music apps - maybe not many for you We're focusing on the "not many" part today😅
should be realtime-safe (special kind of coding) ◦ Keeping deadline is the only requirement ◦ RT-safety is required only on audio threads (e.g. GUI is not RT-safe) ◦ If anyone involved broke the deadline ▪ it may result in audio glitches (noises) 😖 ▪ some pro musicians notice the lag • annoying to play together • uncomfortable recordings, retakes
Android 8.1) has solid support for low latency audio ◦ at best, an audio device can be exclusively occupied by an app (usually it is shared) ◦ Oboe is more popular, user-friendly API (also works for <8.0 platforms) • Android CDD section 5.6 Audio Latency and 5.10 Professional Audio ◦ ProAudio round-trip latency must be within 20 msec. (to analog) or 25 msec. (to USB) If you are serious about latency, get a Pro-Audio device (Pixel, some Galaxy, ROG...)
like YouTube / YT Music use Jetpack Media3 (ExoPlayer) and ExoPlayer does not even use AAudio (and not laggy) But creative music apps are lively interactive and latency matters.
be written in RT-safe language (C++, C, Rust, Zig...) • We do write audio code in C++ on Android too • It should not matter because RT safety is required only on audio thread
any approach is alright Desktop, Android, iOS... Android Audio in C++ Audio in C++ x-plat UI, C++ Compose, Android View iOS Audio in C++ SwiftUI, UIKit Desktop Audio in C++ native C++ Desktop Audio in C++ native UI C#, Swift, ... Desktop, Android, iOS... Audio in C++ x-plat UI C#, Dart, Web UI, ... It is particularly popular in audio (JUCE, OpenGL, Qt, etc.)
brought in a lot of audio features: • MIDI 1.0 and 2.0, in Java and C++ (Android 6, 10, 13, 15) • Spatializer and hardware-accelerated head tracker in Android 12 • LE Audio support and codec enhancements (e.g. Pixel Buds) • OEM audio plugin services for Android Auto in Android 14 Can you name any other features that are required on Android platform?
Small screens • One app per screen • Isolated apps We can't "fix" those issues ➔ Have different product goals for mobiles. (iOS is hard too.) cf. new desktop mode on Android tablets.
play instruments ➔ audio plugin format (MIDI 1.0 is not expressive enough) There are some common formats (VST3, AudioUnit, LV2, CLAP, AAX, ...) They are different but similar. Take them like programming language runtimes.
Those synth devs are irreplaceable. A plugin format builds its ecosystem. More supporting host DAWs => expands every plugin's market, and vice versa. If an instrument cannot be used on a DAW, do you purchase it? If a DAW cannot load others' instruments, do you purchase it? This is Android now. This should change.
compare to the plethora of VSTs, AUs that iOS users can install. This needs to change in all fairness to make it a complete DAW." (Steinberg responds) "Unfortunately the given limitations on Android, prevents the app to show up with the same features compared to iOS"
Android: we can't load dynamic libs from another app ◦ Technically we can on Android, but it violates Google Play Store policy. • We have to use IPC (code) and shared memory (data) instead 🎧 🎧
IPC foundation • C++ API available (Android 10) • supports realtime priority inheritance at Linux kernel level (Android 8) ◦ it usually does not happen because "RT-safety == no system calls" ◦ but unavailable in framework domain... (i.e. vendor-only) 😖
any View can be rendered on host SurfaceView (host instantiates them) ◦ gives almost full UI control to the plugin process itself. ◦ hard to deal with it, hard to debug (e.g. I cannot fully control JUCE UI) • Web UI ◦ loadable on the hosting (DAW) process ◦ build plugin UI has to be written in Web technology ◦ UI has to interact with non-UI (DSP) via IPC ◦ might become a thing depending on how audio app ecosystem accepts Web UI • System Alert Window - kind of deprecated
a mobile-friendly V3. based on App Extensions technology (AudioUnit extensions) Even released Logic Pro for iPad (2023) (and of course other DAWs can use AUv3) Their GUI can show up as "compact view" https://www.apple.com/logic-pro-for-ipad/
as XNU turnstiles (iOS 12) and Audio Workgroups (iOS 14). DAWs and AudioUnits appreciate them. Meet Audio Workgroups (WWDC 2020) (no need if your app and plugins work with just one audio thread)
inheritance to everyone" is likely refused by the Android platform team (fair enough...) Android 16 supports in-process media codecs (vendor codecs loaded in user apps) • only "safe" codecs can be loaded in-process (default: sandboxed) • safe == written in Rust etc. • verified when their APEX package is loaded • not like any app developer on Play Store can distribute (vendor-only)
Run arbitrary plugin code in process for verified code? ➔ hard ◦ How do you design data sharing between in-process DSP code and out-of-process UI code? • Give IPC priority inheritance for verified code? ➔ maybe? But there is no official way to write "safe" code right now: • Rust is not even an official NDK language • Those "artistic" works are already done in C++... "safe C++" kind of? • Standardized safety verification? We think about them in the future 🫠
(plugin formats). • Improve Android support in x-plat music C++ libraries ◦ Most of existing apps are written in x-plat code w/ those libraries ▪ I indeed ported ~30 plugins from x-plat OSS projects to Android • Support and enhance x-plat technologies for easier porting from desktop • MIDI 2.0 offers a lot of audio plugin feature parity • Web UI, JavaScript and WebAssembly
for audio plugins and that's why we're behind iOS in this market We can build audio plugin ecosystems - without realtime safety (yet) We can improve the ecosystem by ourselves!