0.37.0 (71): one engine, one version for Android and iOS

- Three source trees: core/ (shared C++ engine, moved from ios/core),
  app/ (Android UI), ios/app/ (iOS UI)
- Android plays through core/ via JNI (EngineHost, jni_engine.cpp): the Oboe
  callback renders natively; the Kotlin model is mirrored as project text and
  applied as a diff, so playback continues through edits
- The Kotlin engine moves to the unit tests as ReferenceEngine (golden reference)
- Shared MasterRecorder in core/src/host, used by both apps; host_test
- versions.properties: one versionName/versionCode for both platforms,
  continuing Android's numbering (iOS 0.6.0/11 -> 0.37.0/71)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-16 14:49:46 +01:00
co-authored by Claude Opus 5.5
parent 64e21e0bcc
commit 2bc5cb1cbb
107 changed files with 2921 additions and 1880 deletions
+29 -27
View File
@@ -24,22 +24,22 @@
SHELL := /bin/sh
VERSIONS := ../versions.properties
VERSION := $(shell sed -n 's/^ios.versionName[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
BUILD_NO := $(shell sed -n 's/^ios.versionCode[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
VERSION := $(shell sed -n 's/^versionName[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
BUILD_NO := $(shell sed -n 's/^versionCode[[:space:]]*=[[:space:]]*//p' $(VERSIONS) | tr -d ' ')
APP_ID := cc.tiredsysadmin.ios.sizzle
PROJECT := app/Sizzle.xcodeproj
APP_SRC := $(shell find app core/src core/include -type f -not -path '*.xcodeproj/*')
APP_SRC := $(shell find app ../core/src ../core/include -type f -not -path '*.xcodeproj/*')
DEV_APP := build/dev/Build/Products/Release-iphoneos/Sizzle.app
IPA := dist/$(APP_ID)_$(BUILD_NO).ipa
# C++ DSP core: reference audio lives in core/golden/ (regenerated, not committed).
CORE_SRC := $(wildcard core/src/*.cpp core/src/*/*.cpp)
CORE_HDR := $(wildcard core/include/sizzle/*.hpp core/src/*/*.hpp)
# C++ DSP core: reference audio lives in ../core/golden/ (regenerated, not committed).
CORE_SRC := $(wildcard ../core/src/*.cpp ../core/src/*/*.cpp)
CORE_HDR := $(wildcard ../core/include/sizzle/*.hpp ../core/src/*/*.hpp)
CXX ?= c++
CXXFLAGS := -std=c++17 -O2 -Wall -Wextra -Icore/include -Icore/src -Icore/src/fx -lz
GOLDEN := core/golden
SPECS_GEN := core/include/sizzle/DeviceSpecs.gen.hpp
CXXFLAGS := -std=c++17 -O2 -Wall -Wextra -I../core/include -I../core/src -I../core/src/fx -lz
GOLDEN := ../core/golden
SPECS_GEN := ../core/include/sizzle/DeviceSpecs.gen.hpp
# Gradle needs the Android SDK; same default location as the Android Makefile.
ANDROID_SDK ?= $(or $(ANDROID_HOME),$(HOME)/Library/Android/sdk)
@@ -62,29 +62,33 @@ golden:
./gradlew -q :app:testDebugUnitTest --tests '*IosGolden*' --rerun
@ls $(GOLDEN)/*.scn | wc -l | xargs echo "reference scenarios:"
build/core/golden_test: $(CORE_SRC) $(CORE_HDR) core/tests/golden_test.cpp
build/core/golden_test: $(CORE_SRC) $(CORE_HDR) ../core/tests/golden_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) core/tests/golden_test.cpp
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) ../core/tests/golden_test.cpp
build/core/sampler_test: $(CORE_SRC) $(CORE_HDR) core/tests/sampler_test.cpp
build/core/sampler_test: $(CORE_SRC) $(CORE_HDR) ../core/tests/sampler_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -Icore/src/sampler -o $@ $(CORE_SRC) core/tests/sampler_test.cpp
$(CXX) $(CXXFLAGS) -I../core/src/sampler -o $@ $(CORE_SRC) ../core/tests/sampler_test.cpp
build/core/engine_test: $(CORE_SRC) $(CORE_HDR) core/tests/engine_test.cpp
build/core/engine_test: $(CORE_SRC) $(CORE_HDR) ../core/tests/engine_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) core/tests/engine_test.cpp
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) ../core/tests/engine_test.cpp
build/core/io_test: $(CORE_SRC) $(CORE_HDR) core/tests/io_test.cpp
build/core/io_test: $(CORE_SRC) $(CORE_HDR) ../core/tests/io_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) core/tests/io_test.cpp
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) ../core/tests/io_test.cpp
build/core/midi_test: core/include/sizzle/Midi.hpp core/tests/midi_test.cpp
build/core/host_test: $(CORE_SRC) $(CORE_HDR) ../core/tests/host_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -o $@ core/tests/midi_test.cpp
$(CXX) $(CXXFLAGS) -o $@ $(CORE_SRC) ../core/tests/host_test.cpp
build/core/zip_test: core/src/io/Zip.cpp core/src/io/Zip.hpp core/tests/zip_test.cpp
build/core/midi_test: ../core/include/sizzle/Midi.hpp ../core/tests/midi_test.cpp
mkdir -p build/core
$(CXX) $(CXXFLAGS) -o $@ ../core/tests/midi_test.cpp
build/core/zip_test: ../core/src/io/Zip.cpp ../core/src/io/Zip.hpp ../core/tests/zip_test.cpp
mkdir -p build/core/zipfix/dir
$(CXX) $(CXXFLAGS) -o $@ core/src/io/Zip.cpp core/tests/zip_test.cpp -lz
$(CXX) $(CXXFLAGS) -o $@ ../core/src/io/Zip.cpp ../core/tests/zip_test.cpp -lz
# A Java-written archive (ZipOutputStream, like Android's) for zip_test, and ours checked by unzip.
zip-test: build/core/zip_test
@@ -94,13 +98,14 @@ zip-test: build/core/zip_test
build/core/zip_test build/core/java.zip build/core/ours.zip
unzip -tq build/core/ours.zip
core-test: build/core/golden_test build/core/sampler_test build/core/engine_test build/core/io_test build/core/midi_test zip-test
core-test: build/core/golden_test build/core/sampler_test build/core/engine_test build/core/io_test build/core/midi_test build/core/host_test zip-test
@test -f $(GOLDEN)/input.f32 || $(MAKE) --no-print-directory golden
build/core/golden_test $(GOLDEN) $(TYPES)
build/core/sampler_test
build/core/engine_test $(GOLDEN)/songs
build/core/io_test $(GOLDEN)/songs ../app/src/test/resources/mikroseq
build/core/midi_test
build/core/host_test $(GOLDEN)/songs
# ------------------------------------------------------------------ app
AU_SRC := app/FX/SizzleDeviceAU.mm app/FX/SizzleEffectAU.mm app/FX/SizzleInstrumentAU.mm app/FX/SizzleDeviceAU+Sources.mm
@@ -174,11 +179,8 @@ $(IPA): $(PROJECT)/project.pbxproj $(APP_SRC) $(VERSIONS)
bump-major: ; @$(MAKE) --no-print-directory bump FIELD=1
bump-minor: ; @$(MAKE) --no-print-directory bump FIELD=2
bump-patch: ; @$(MAKE) --no-print-directory bump FIELD=3
bump:
@new=$$(echo $(VERSION) | awk -F. -v f=$(FIELD) '{ if (f==1) {$$1++; $$2=0; $$3=0} else if (f==2) {$$2++; $$3=0} else {$$3++} print $$1"."$$2"."$$3 }'); \
code=$$(( $(BUILD_NO) + 1 )); \
sed -i '' -e "s/^ios.versionName .*/ios.versionName = $$new/" -e "s/^ios.versionCode .*/ios.versionCode = $$code/" $(VERSIONS); \
echo "ios $$new (build $$code)"
bump: # one version for Android and iOS: the root Makefile owns it
@$(MAKE) -C .. --no-print-directory bump FIELD=$(FIELD)
# ------------------------------------------------------------------ spike
$(SPIKE_PROJ)/project.pbxproj: spike/project.yml