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:
co-authored by
Claude Opus 5
parent
634dd05486
commit
ba98ec56f4
+13
-4
@@ -10,6 +10,7 @@ Makefile (`make -C ios help`).
|
||||
| `../core/` | The shared C++ engine (Android plays through it too): a port of the Android app's Kotlin DSP |
|
||||
| `../core/include/sizzle/DeviceSpecs.gen.hpp` | Every device's parameters, generated from `ToolboxType` (Kotlin) |
|
||||
| `../core/tests/golden_test.cpp` | Compares the core with audio the Kotlin code renders |
|
||||
| `../core/tests/voices/` | The `TestVoice` wrappers `golden_test` drives the instruments through. Under `tests/`, not `src/`, so neither app compiles them |
|
||||
| `app/components.txt` | The plugin list (AU type, subtype, device, name) |
|
||||
| `app/FX/` | The plugin extension: `SizzleDeviceAU` (shared: parameters, presets, state), `SizzleEffectAU` (aufx), `SizzleInstrumentAU` (aumu), `SizzleFXViewController` (factory + editor). The app compiles the same classes to host them itself |
|
||||
| `app/Host/SizzleSession*` | The bridge to the C++ song + engine (audio output, song lock, live-note queue); one category per screen |
|
||||
@@ -27,8 +28,11 @@ listed in `CHANGELOG.md` here.
|
||||
|
||||
## How the port is verified
|
||||
|
||||
The Kotlin DSP is the reference. `make golden` runs `IosGoldenExport` (a JVM unit
|
||||
test in the Android app, skipped by the normal `make check`), which:
|
||||
The Kotlin DSP is the reference. It lives in the Android app's **test** source set
|
||||
(`../app/src/test/java/.../audio`, `frasil`, `echofield`, `wavetable`) — both apps
|
||||
play `core/`, so it is no longer part of either one. `make golden` runs
|
||||
`IosGoldenExport` (a JVM unit test in the Android app, skipped by the normal
|
||||
`make check`), which:
|
||||
|
||||
- writes `DeviceSpecs.gen.hpp`, so iOS uses the same parameter definitions
|
||||
(keys, labels, ranges, defaults, choices) and the Mix Tightener presets;
|
||||
@@ -38,8 +42,13 @@ test in the Android app, skipped by the normal `make check`), which:
|
||||
`../core/golden/` (not committed; regenerate any time).
|
||||
|
||||
`make core-test` renders the same scenarios through the C++ core and requires a
|
||||
largest difference below 1e-4. Today all 25 pass; most are bit-exact, the rest
|
||||
differ by about one float ulp. Porting rules that make this possible:
|
||||
largest difference below 1e-4. Today all 61 pass; most are bit-exact, the rest
|
||||
differ by about one float ulp. It compiles the core at `-O2` — and so does Xcode
|
||||
(`GCC_OPTIMIZATION_LEVEL: 2` on the `SizzleCore` target in `app/project.yml`, in
|
||||
every configuration), so the build that ships is the build that was measured. An
|
||||
optimisation level is not a free choice here: it decides FP contraction, and the
|
||||
comparison only holds for the level the tests use. Porting rules that make this
|
||||
possible:
|
||||
|
||||
- translate line for line, keeping Kotlin's types: `Float` → `float`,
|
||||
`Double` → `double`, so every expression runs in the same precision;
|
||||
|
||||
Reference in New Issue
Block a user