0.41.2 (78): cleanup and optimisation round (Android and iOS)

Nothing user-visible changes, except that the Android app is half the size and
both are lighter on the battery.

R8 is on for release builds (21.5 MB -> 10.1 MB); only the two JNI classes are
pinned by name, since the app reflects over nothing of its own, and `make dist`
keeps the mapping beside the APK. The Kotlin DSP that core/ replaced in 0.37.0
was still compiled into every APK with nothing calling it — it moves to the test
source set, where it belongs as the reference the C++ is checked against — and
the golden tests' TestVoice wrappers leave core/src for core/tests/voices, so
neither app compiles them either.

Speed: channel gain, mute/solo and the FX chain are read once per audio block
instead of once per frame in Engine::fillBlock (both platforms, bit-identical —
all 61 reference scenarios still match); the transport pollers idle at 100 ms
(Android) and 10 Hz (iOS) instead of polling flat out while a song is stopped,
woken by any transport call; ProjectIo.save builds into one pre-sized buffer and
a burst of edits is coalesced into one engine sync; the Kotlin grain sources and
factory wavetables are built when their editor opens rather than at launch, where
they duplicated ~6 MB the engine already renders in core/; and Xcode builds the
DSP core at -O2, the level the golden tests measure, not -Os.

Fix: `make lint` failed on a manifest asking for ACCESS_FINE_LOCATION without
ACCESS_COARSE_LOCATION (the BLE MIDI scan on Android 8-11), so `make check`
passes again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-18 21:01:29 +01:00
co-authored by Claude Opus 5
parent 634dd05486
commit ba98ec56f4
46 changed files with 508 additions and 192 deletions
+12 -1
View File
@@ -35,6 +35,10 @@ FDROID_METADATA := /var/lib/fdroid/metadata
# directory expects; app/build.gradle.kts stamps the same name onto the output.
APK_NAME := $(APP_ID)_$(VERSION_CODE).apk
RELEASE_APK := app/build/outputs/apk/release/$(APK_NAME)
# R8 renames the release build, so a crash report from it is unreadable without
# this. It is staged beside the APK and kept locally — never published.
RELEASE_MAP := app/build/outputs/mapping/release/mapping.txt
DIST_MAP := dist/$(APP_ID)_$(VERSION_CODE)-mapping.txt
STAGING_APK := app/build/outputs/apk/staging/app-staging.apk
METADATA_YML := dist/$(APP_ID).yml
@@ -110,12 +114,18 @@ launch:
# ------------------------------------------------------------------ dist
# Everything a publish needs, staged locally first so it can be inspected
# before anything leaves the machine.
dist: dist/$(APK_NAME) $(METADATA_YML)
dist: dist/$(APK_NAME) $(DIST_MAP) $(METADATA_YML)
dist/$(APK_NAME): $(RELEASE_APK)
@mkdir -p dist
cp $(RELEASE_APK) $@
# The de-obfuscation map for this exact versionCode. `publish` does not upload it;
# it stays here so a stack trace from the published APK can still be read.
$(DIST_MAP): $(RELEASE_APK)
@mkdir -p dist
cp $(RELEASE_MAP) $@
# F-Droid metadata. Regenerated from versions.properties on every dist so the
# CurrentVersion lines can never lag the APK next to them.
$(METADATA_YML): $(VERSIONS) Makefile
@@ -153,6 +163,7 @@ publish-metadata: $(METADATA_YML)
publish: publish-apk publish-metadata
@echo "published $(APP_ID) $(VERSION_NAME) ($(VERSION_CODE)); sign it on the repo host"
@echo "keep $(DIST_MAP) — it is the only way to read a crash from this build"
# ------------------------------------------------------------------ versioning
# versionCode always moves by exactly 1: F-Droid and the package manager order